MAJ Graydon : Amélioration parsing XML + cache
This commit is contained in:
parent
384334e497
commit
0669ad8ee8
@ -210,8 +210,15 @@ function parseAmount($nodeList, $currency = ''){
|
|||||||
return $amount;
|
return $amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseFreeText($query){
|
||||||
|
global $xpath;
|
||||||
|
$tab = array();
|
||||||
|
$items = $xpath->query($query);
|
||||||
|
foreach ($items as $item){
|
||||||
|
$tab[] = $item->nodeValue;
|
||||||
|
}
|
||||||
|
return $tab;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function formatName($node){
|
function formatName($node){
|
||||||
|
@ -5,7 +5,7 @@ $tabInfo = $_SESSION['tabInfo'];
|
|||||||
|
|
||||||
//$list_international = unserialize(gzuncompress($_SESSION['list_international']));
|
//$list_international = unserialize(gzuncompress($_SESSION['list_international']));
|
||||||
$identifier = $_REQUEST['identifier'];
|
$identifier = $_REQUEST['identifier'];
|
||||||
$pays = $_SESSION['pays'];
|
$pays = $_SESSION['graydon']['pays'];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
getCompanyProduct
|
getCompanyProduct
|
||||||
@ -22,6 +22,7 @@ require_once 'graydon/graydonws.php';
|
|||||||
$path = PATH_DATA.'/graydon/method';
|
$path = PATH_DATA.'/graydon/method';
|
||||||
$fileName = strtolower('CompanyMatchIdentifiers-'.$pays);
|
$fileName = strtolower('CompanyMatchIdentifiers-'.$pays);
|
||||||
|
|
||||||
|
/** Recup des types d'identifiants pour le pays **/
|
||||||
if(!file_exists($path.'/'.$fileName)){
|
if(!file_exists($path.'/'.$fileName)){
|
||||||
//Récupération des intitulés identifiant
|
//Récupération des intitulés identifiant
|
||||||
$request = new StdClass();
|
$request = new StdClass();
|
||||||
@ -46,56 +47,96 @@ if(!file_exists($path.'/'.$fileName)){
|
|||||||
require_once 'soaperror.php';
|
require_once 'soaperror.php';
|
||||||
processSoapFault($client,$fault,$tabInfo);
|
processSoapFault($client,$fault,$tabInfo);
|
||||||
}
|
}
|
||||||
exit;
|
|
||||||
}else{
|
}else{
|
||||||
$tabIdentifiers = unserialize(file_get_contents($path.'/'.$fileName));
|
$tabIdentifiers = unserialize(file_get_contents($path.'/'.$fileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the request parameters
|
|
||||||
$request = new StdClass();
|
|
||||||
// Initialise the request object
|
|
||||||
$request->Authentication_Parameters = $authentication;
|
|
||||||
$request->CompanyMatchIdentifier = $identifier;
|
|
||||||
$firephp->log($request,'requete');
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// Make a request on the web service
|
|
||||||
$result = $graydon->getCompanyProducts($request);
|
|
||||||
// Print out the result
|
|
||||||
print "<!--";
|
|
||||||
print "Transaction Identifier : ".$result->Service_Log->TransactionIdentifier;
|
|
||||||
print "\n";
|
|
||||||
print "Partner User Id : ".$result->Service_Log->PartnerUserId;
|
|
||||||
print "\n";
|
|
||||||
print_r($result);
|
|
||||||
print "-->";
|
|
||||||
|
|
||||||
$firephp->log($result,'result');
|
/** Recup des produits de la company **/
|
||||||
|
|
||||||
|
$path = PATH_DATA.'/graydon';
|
||||||
|
$fileName = strtolower('CompanyProducts-'.$identifier);
|
||||||
|
$fileName = str_replace(':', '-', $fileName);
|
||||||
|
$now = mktime(date('G'), date('i'), date('s'), date("m") , date("d"), date("Y"));
|
||||||
|
|
||||||
|
if(!file_exists($path.'/'.$fileName) || filemtime($path.'/'.$fileName)>$now+16 ){
|
||||||
|
// Create the request parameters
|
||||||
|
$request = new StdClass();
|
||||||
|
// Initialise the request object
|
||||||
|
$request->Authentication_Parameters = $authentication;
|
||||||
|
$request->CompanyMatchIdentifier = $identifier;
|
||||||
|
$firephp->log($request,'requete');
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Make a request on the web service
|
||||||
|
$result = $graydon->getCompanyProducts($request);
|
||||||
|
// Print out the result
|
||||||
|
print "<!--";
|
||||||
|
print "Transaction Identifier : ".$result->Service_Log->TransactionIdentifier;
|
||||||
|
print "\n";
|
||||||
|
print "Partner User Id : ".$result->Service_Log->PartnerUserId;
|
||||||
|
print "\n";
|
||||||
|
print_r($result);
|
||||||
|
print "-->";
|
||||||
|
|
||||||
|
$firephp->log($result,'result');
|
||||||
|
|
||||||
|
file_put_contents($path.'/'.$fileName, serialize($result));
|
||||||
|
|
||||||
|
}catch( SoapFault $fault ){
|
||||||
|
require_once 'soaperror.php';
|
||||||
|
processSoapFault($client,$fault,$tabInfo);
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$result = unserialize(file_get_contents($path.'/'.$fileName));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($result)){
|
||||||
$company = $result->Company;
|
$company = $result->Company;
|
||||||
$products = $result->Products->Product;
|
$products = $result->Products->Product;
|
||||||
?>
|
?>
|
||||||
<table width="580" border="0" align="left" bgcolor="#FFFFFF">
|
<div id="center">
|
||||||
<tr>
|
|
||||||
<td colspan="3"><img src="./img/rub_identite.png" width="577" height="36"></td>
|
<h1 class="titre">IDENTITÉ INTERNATIONALE DE L'ENTREPRISE</h1>
|
||||||
</tr>
|
|
||||||
<tr>
|
<table >
|
||||||
<td width="30"> </td>
|
<tr>
|
||||||
<td width="200" class="StyleInfoLib">Fiche identité simplifié<br/></td>
|
<td width="30"> </td>
|
||||||
<td>
|
<td width="200" class="StyleInfoLib">Fiche identité simplifié<br/></td>
|
||||||
<?php
|
<td>
|
||||||
|
<?php
|
||||||
$count = count($products);
|
$count = count($products);
|
||||||
if($count==1){
|
if($count==1){
|
||||||
$products[] = $products;
|
$products[] = $products;
|
||||||
}
|
}
|
||||||
foreach($products as $product){
|
foreach($products as $product){
|
||||||
if($product->ServiceSpeed == 'Immediate' && $product->Type == 'Database'){
|
if ($product->ServiceSpeed == 'Immediate' && $product->Type == 'Database' && $product->Level == 3 ){
|
||||||
?>
|
|
||||||
<a href="./?page=international_identitec&identifier=<?php print $identifier;?>&pidentifier=<?php print $product->CompanyProductIdentifier;?>">Accéder à la fiche identité approfondie (payant).</a>
|
$mimetype = FALSE;
|
||||||
<?php
|
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 ){
|
||||||
|
|
||||||
|
$pidentifier = $product->CompanyProductIdentifier;
|
||||||
|
$position = strpos($pidentifier,':');
|
||||||
|
$TransactionIdentifier = $_SESSION['graydon']['TransactionIdentifier'];
|
||||||
|
$SessionID = $_SESSION['graydon']['SessionID'];
|
||||||
|
$pidentifier = substr($pidentifier,0,$position).':'.$SessionID.':'.$TransactionIdentifier;
|
||||||
|
?>
|
||||||
|
<a href="./?page=international_identitec&identifier=<?php print $identifier;?>&pidentifier=<?php print $pidentifier;?>">Accéder à la fiche identité approfondie (payant).</a>
|
||||||
|
<?php
|
||||||
|
}else{
|
||||||
|
?>
|
||||||
|
(Rapport immédiat indisponible)
|
||||||
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -140,9 +181,12 @@ try
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
</table>
|
||||||
<td colspan="3"><img src="./img/srub_id.png" width="576" height="27"></td>
|
|
||||||
</tr>
|
<h2>Raison sociale et coordonnées : </h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
<td width="200" class="StyleInfoLib">Raison Sociale</td>
|
||||||
@ -194,9 +238,11 @@ try
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="3"> </td>
|
<td colspan="3"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
</table>
|
||||||
<td colspan="3"><img src="./img/srub_activite.png" width="576" height="27"></td>
|
|
||||||
</tr>
|
<h2>Activité(s) de l'entreprise : </h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
<?php
|
<?php
|
||||||
$count = count($company->Activites->Activity);
|
$count = count($company->Activites->Activity);
|
||||||
if ($count>1){
|
if ($count>1){
|
||||||
@ -216,7 +262,7 @@ try
|
|||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td colspan="2" class="StyleInfoData">Aucune information disponible</td>
|
<td colspan="2" class="StyleInfoData">Aucune information disponible</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -228,8 +274,15 @@ try
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
}catch( SoapFault $fault ){
|
}else{
|
||||||
require_once 'soaperror.php';
|
?>
|
||||||
processSoapFault($client,$fault,$tabInfo);
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td colspan="2" class="StyleInfoData">Aucune information disponible</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
</div>
|
||||||
|
@ -9,8 +9,19 @@ $CompanyProductIdentifier = $_REQUEST['pidentifier'];
|
|||||||
require_once 'graydon/functions.php';
|
require_once 'graydon/functions.php';
|
||||||
require_once 'graydon/graydonws.php';
|
require_once 'graydon/graydonws.php';
|
||||||
|
|
||||||
|
function dVal($value){
|
||||||
|
if($value == '' || $value == NULL){
|
||||||
|
print 'NC';
|
||||||
|
}else{
|
||||||
|
print $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div id="center">
|
||||||
|
<?php
|
||||||
|
|
||||||
$path = PATH_DATA.'/graydon';
|
$path = PATH_DATA.'/graydon';
|
||||||
$fileName = str_replace(':', '-', $identifier).'.xml';
|
$fileName = strtolower(str_replace( array(':',' '), '-', $identifier).'.xml');
|
||||||
|
|
||||||
if(!file_exists($path.'/'.$fileName)){
|
if(!file_exists($path.'/'.$fileName)){
|
||||||
/*
|
/*
|
||||||
@ -26,6 +37,7 @@ if(!file_exists($path.'/'.$fileName)){
|
|||||||
*/
|
*/
|
||||||
//placeOrder
|
//placeOrder
|
||||||
$request = new StdClass();
|
$request = new StdClass();
|
||||||
|
$firephp->log($authetication,'authentication');
|
||||||
$request->Authentication_Parameters = $authentication;
|
$request->Authentication_Parameters = $authentication;
|
||||||
$request->OrderCreatorEmail = 'mricois@scores-decisions.com';
|
$request->OrderCreatorEmail = 'mricois@scores-decisions.com';
|
||||||
$request->CompanyProductIdentifier = $CompanyProductIdentifier;
|
$request->CompanyProductIdentifier = $CompanyProductIdentifier;
|
||||||
@ -43,7 +55,6 @@ if(!file_exists($path.'/'.$fileName)){
|
|||||||
|
|
||||||
//On vérifie l'état de le demande
|
//On vérifie l'état de le demande
|
||||||
if (isset($placeOrderResult) && $placeOrderResult->OrderStatus->OrderState == 'Completed'){
|
if (isset($placeOrderResult) && $placeOrderResult->OrderStatus->OrderState == 'Completed'){
|
||||||
|
|
||||||
//getCompanyReport
|
//getCompanyReport
|
||||||
$request = new StdClass();
|
$request = new StdClass();
|
||||||
$request->Authentication_Parameters = $authentication;
|
$request->Authentication_Parameters = $authentication;
|
||||||
@ -77,13 +88,10 @@ if(!file_exists($path.'/'.$fileName)){
|
|||||||
//========= Affichage des informations =========
|
//========= Affichage des informations =========
|
||||||
if(isset($xml) && $xml!=''){
|
if(isset($xml) && $xml!=''){
|
||||||
?>
|
?>
|
||||||
|
<h1 class="titre">IDENTITÉ INTERNATIONALE DE L'ENTREPRISE</h1>
|
||||||
|
|
||||||
<table width="580" border="0" align="left" bgcolor="#FFFFFF">
|
<table>
|
||||||
<tr>
|
|
||||||
<td colspan="3"><img src="./img/rub_identite.png" width="577" height="36"></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$tabCompany = array();
|
$tabCompany = array();
|
||||||
//Création du DOM
|
//Création du DOM
|
||||||
$doc = new DOMDocument;
|
$doc = new DOMDocument;
|
||||||
@ -96,13 +104,12 @@ $tabCompany['Identite']['Address'] = parseCompanyAddress();
|
|||||||
$tabCompany['Identite']['Communication'] = parseCommunication();
|
$tabCompany['Identite']['Communication'] = parseCommunication();
|
||||||
$tabCompany['Identite']['Dirigeants'] = parseDirectorDetails();
|
$tabCompany['Identite']['Dirigeants'] = parseDirectorDetails();
|
||||||
$tabCompany['Identite']['Activite'] = parseTaxonomy('Nace');
|
$tabCompany['Identite']['Activite'] = parseTaxonomy('Nace');
|
||||||
|
$tabCompany['Identite']['Activite']['Text'] = parseFreeText('//GraydonUKCompanySchema/CompanyReportPage/CompanyReport/FreeText[@Type="Activities"]');
|
||||||
$tabCompany['Identite']['Effectif'] = parseEmployees('Staff_Employed');
|
$tabCompany['Identite']['Effectif'] = parseEmployees('Staff_Employed');
|
||||||
$tabCompany['Identite']['Capital'] = parseShare_Capital();
|
$tabCompany['Identite']['Capital'] = parseShare_Capital();
|
||||||
$tabCompany['Identite']['ResumeFinance'] = parseFinancial_Summary();
|
$tabCompany['Identite']['ResumeFinance'] = parseFinancial_Summary();
|
||||||
|
|
||||||
$firephp->log($tabCompany,'tabCompany');
|
$firephp->log($tabCompany,'tabCompany');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php foreach($tabCompany['Identite']['Subject']['CompanyId'] as $identifiant => $value){ ?>
|
<?php foreach($tabCompany['Identite']['Subject']['CompanyId'] as $identifiant => $value){ ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
@ -110,30 +117,26 @@ $firephp->log($tabCompany,'tabCompany');
|
|||||||
<td width="350" class="StyleInfoData"><?php print $value;?></td>
|
<td width="350" class="StyleInfoData"><?php print $value;?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
</table>
|
||||||
|
|
||||||
<tr>
|
<h2>Raison sociale et coordonnées : </h2>
|
||||||
<td width="30"> </td>
|
|
||||||
<td colspan="2"></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td colspan="2">Raison sociale et coordonnées : </td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Raison Sociale : </td>
|
<td width="200" class="StyleInfoLib">Raison Sociale : </td>
|
||||||
<td width="350" class="StyleInfoData"><?php print $tabCompany['Identite']['Subject']['Name'];?></td>
|
<td width="350" class="StyleInfoData"><?php print $tabCompany['Identite']['Subject']['Name'];?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Forme légale : </td>
|
<td width="200" class="StyleInfoLib">Forme légale : </td>
|
||||||
<td width="350" class="StyleInfoData">
|
<td width="350" class="StyleInfoData">
|
||||||
<?php
|
<?php
|
||||||
foreach($tabCompany['Identite']['FormeLegale'] as $item => $value){
|
if(count($tabCompany['Identite']['FormeLegale'])==0){print 'NC';}
|
||||||
print $value.' - ('.$item.')';
|
else{
|
||||||
|
foreach($tabCompany['Identite']['FormeLegale'] as $item => $value){
|
||||||
|
print $value.' - ('.$item.')<br/>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -144,57 +147,58 @@ $firephp->log($tabCompany,'tabCompany');
|
|||||||
<td width="200" class="StyleInfoLib">Date de création : </td>
|
<td width="200" class="StyleInfoLib">Date de création : </td>
|
||||||
<td width="350" class="StyleInfoData">
|
<td width="350" class="StyleInfoData">
|
||||||
<?php
|
<?php
|
||||||
print $tabCompany['Identite']['Subject']['Date']['Age_of_Company'];
|
dVal($tabCompany['Identite']['Subject']['Date']['Age_of_Company']);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
foreach($tabCompany['Identite']['Address'] as $type => $elements){
|
if(count($tabCompany['Identite']['Address'])==0){print 'Aucune adresse définie';}
|
||||||
|
else{
|
||||||
|
foreach($tabCompany['Identite']['Address'] as $type => $elements){
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib"><?php print $type;?></td>
|
<td width="200" class="StyleInfoLib"><?php print $type;?></td>
|
||||||
<td width="350" class="StyleInfoData"></td>
|
<td width="350" class="StyleInfoData"><?php print $elements['EntireAddress'];?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
foreach($elements as $item => $value){
|
|
||||||
if($value!=''){
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td width="200" class="StyleInfoLib"><?php print $item;?></td>
|
|
||||||
<td width="350" class="StyleInfoData"><?php print $value;?></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
<tr>
|
<h2>Activité(s) et chiffre d'affaire de l'entreprise : </h2>
|
||||||
<td width="30"> </td>
|
|
||||||
<td colspan="2"></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td width="30"> </td>
|
|
||||||
<td colspan="2">Activité et chiffre d'affaire de l'entreprise : </td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Activité : </td>
|
<td width="200" class="StyleInfoLib">Activité : </td>
|
||||||
<td width="350" class="StyleInfoData">
|
<td width="350" class="StyleInfoData">
|
||||||
<?php
|
<?php
|
||||||
foreach($tabCompany['Identite']['Activite'] as $item => $value){
|
foreach($tabCompany['Identite']['Activite'] as $item => $value){
|
||||||
print $item.' : '.$value['Code'].' - '.$value['Value'];
|
if($item != 'Text'){
|
||||||
|
print $item.' : '.$value['Code'].' - '.$value['Value'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($tabCompany['Identite']['Activite']['Text'])!=0){
|
||||||
|
?>
|
||||||
|
<br/><br>
|
||||||
|
<u>Informations complémentaires :</u><br/>
|
||||||
|
<?php
|
||||||
|
foreach($tabCompany['Identite']['Activite']['Text'] as $value){
|
||||||
|
print $value.'<br/>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
foreach($tabCompany['Identite']['Dirigeants'] as $element){
|
foreach($tabCompany['Identite']['Dirigeants'] as $element){
|
||||||
?>
|
?>
|
||||||
@ -214,14 +218,30 @@ foreach($tabCompany['Identite']['Dirigeants'] as $element){
|
|||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="200" class="StyleInfoLib">Effectif :</td>
|
<td width="200" class="StyleInfoLib">Effectif :</td>
|
||||||
<td width="350" class="StyleInfoData">
|
<td width="350" class="StyleInfoData">
|
||||||
<?php print $tabCompany['Identite']['Effectif']?>
|
<?php dVal($tabCompany['Identite']['Effectif']);?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Capital :</td>
|
||||||
|
<td width="350" class="StyleInfoData">
|
||||||
|
<?php dVal($tabCompany['Identite']['Capital']['Issued_Capital']);?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td width="30"> </td>
|
||||||
|
<td width="200" class="StyleInfoLib">Chiffre d'affaire:</td>
|
||||||
|
<td width="350" class="StyleInfoData">
|
||||||
|
<?php dVal($tabCompany['Identite']['ResumeFinance']['Working Capital']);?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}else{
|
}else{
|
||||||
?>
|
?>
|
||||||
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="30"> </td>
|
<td width="30"> </td>
|
||||||
<td width="500" class="StyleInfoLib">Aucune information disponible.</td>
|
<td width="500" class="StyleInfoLib">Aucune information disponible.</td>
|
||||||
@ -231,7 +251,7 @@ foreach($tabCompany['Identite']['Dirigeants'] as $element){
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,14 +10,15 @@ if($vue=='recherche'){
|
|||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('#demo').change(function(){
|
$('#mode').change(function(){
|
||||||
$('#recherche').empty().html('<p><img src="./img/ajax/19-1.gif" /></p>');
|
var mode = $('#mode :selected').val();
|
||||||
var check = $(this).attr("checked");
|
document.location.href='http://extranet.devlocal.com/?page=international_recherche&mode='+mode;
|
||||||
if(check == true){ //Chargement du mode démonstration
|
});
|
||||||
$("#recherche").empty().load("./pages/international_rechercheform.php", {'mode': "demo"});
|
|
||||||
}else{ //Chargement du mode normal
|
$('#pays').change(function(){
|
||||||
$("#recherche").empty().load("./pages/international_rechercheform.php", {'mode': "normal"});
|
var pays = $('#pays :selected').val();
|
||||||
}
|
$('#method').html('<p><img src="./img/ajax/19-1.gif" /></p>');
|
||||||
|
$('#method').load('./pages/graydon/methodfield.php', {'pays': pays});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -26,11 +27,19 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
<h2 class="StyleRechercheTitre">RECHERCHE INTERNATIONALE</h2>
|
<h2 class="StyleRechercheTitre">RECHERCHE INTERNATIONALE</h2>
|
||||||
|
|
||||||
<form name="recherche" class="frm" method="post" action="index.php?page=international_recherche">
|
<form name="recherche" method="post" action="index.php?page=international_recherche">
|
||||||
<input type="hidden" name="vue" value="list">
|
<input type="hidden" name="vue" value="list">
|
||||||
<label>Mode Démonstration : </label><input type="checkbox" id="demo" name="demo" <?php $_REQUEST['mode']=='normal' ? '' : print ' checked="check"' ;?>>
|
<div class="fieldgrp">
|
||||||
|
<label>Mode : </label>
|
||||||
|
<div class="field">
|
||||||
|
<select id="mode" name="mode">
|
||||||
|
<option value="demo" <?php $_REQUEST['mode']=='demo' ? print ' selected' : '' ;?>>Démonstration</option>
|
||||||
|
<option value="normal" <?php $_REQUEST['mode']=='normal' ? print ' selected' : '' ;?>>Normal</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="recherche">
|
<div id="subsearch">
|
||||||
<?php
|
<?php
|
||||||
//Si les paramètres mode, method sont dans l'url alors on force la méthode de recherche
|
//Si les paramètres mode, method sont dans l'url alors on force la méthode de recherche
|
||||||
if(isset($_REQUEST['method']))
|
if(isset($_REQUEST['method']))
|
||||||
@ -42,6 +51,7 @@ require_once 'international_rechercheform.php';
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}elseif($vue=='list'){
|
}elseif($vue=='list'){
|
||||||
@ -49,7 +59,7 @@ require_once 'international_rechercheform.php';
|
|||||||
if($_REQUEST['mode']=='demo'){
|
if($_REQUEST['mode']=='demo'){
|
||||||
?>
|
?>
|
||||||
<div id="internationallist">
|
<div id="internationallist">
|
||||||
<span>Résultat de la recherche de démonstration :</span>
|
<span class="StyleInfoLib">Résultat de la recherche de démonstration :</span>
|
||||||
<?php
|
<?php
|
||||||
require_once 'graydon/graydonws.php';
|
require_once 'graydon/graydonws.php';
|
||||||
// Create the request parameters
|
// Create the request parameters
|
||||||
@ -72,11 +82,13 @@ require_once 'international_rechercheform.php';
|
|||||||
// Get the list of companies
|
// Get the list of companies
|
||||||
$demoCompaniesCountry = $result->DemoCompanies->CountryAndCompany;
|
$demoCompaniesCountry = $result->DemoCompanies->CountryAndCompany;
|
||||||
|
|
||||||
$_SESSION['pays'] = $result->Service_Log->Country;
|
$_SESSION['graydon']['pays'] = $result->Service_Log->Country;
|
||||||
|
$_SESSION['graydon']['SessionID'] = $result->Service_Log->SessionID;
|
||||||
|
$_SESSION['graydon']['TransactionIdentifier'] = $result->Service_Log->TransactionIdentifier;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<br/>
|
<br/>
|
||||||
<span>Pays : <?php print $demoCompaniesCountry->Country; ?></span>
|
<span class="StyleInfoLib">Pays :</span> <span><?php print $demoCompaniesCountry->Country; ?></span>
|
||||||
<ol>
|
<ol>
|
||||||
<?php
|
<?php
|
||||||
$demoCompanies = array();
|
$demoCompanies = array();
|
||||||
@ -114,7 +126,7 @@ require_once 'international_rechercheform.php';
|
|||||||
}elseif($_REQUEST['mode']=='normal'){
|
}elseif($_REQUEST['mode']=='normal'){
|
||||||
?>
|
?>
|
||||||
<div id="internationallist">
|
<div id="internationallist">
|
||||||
<span>Résultat de la recherche :</span>
|
<span class="StyleInfoLib">Résultat de la recherche :</span>
|
||||||
<?php
|
<?php
|
||||||
require_once 'graydon/graydonws.php';
|
require_once 'graydon/graydonws.php';
|
||||||
// Create the request parameters
|
// Create the request parameters
|
||||||
@ -169,9 +181,12 @@ require_once 'international_rechercheform.php';
|
|||||||
print "-->";
|
print "-->";
|
||||||
|
|
||||||
$_SESSION['pays'] = $result->Service_Log->Country;
|
$_SESSION['pays'] = $result->Service_Log->Country;
|
||||||
|
$_SESSION['graydon']['SessionID'] = $result->Service_Log->SessionID;
|
||||||
|
$_SESSION['graydon']['TransactionIdentifier'] = $result->Service_Log->TransactionIdentifier;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<br/>
|
<br/>
|
||||||
<span>Pays : <?php print $result->Service_Log->Country; ?></span>
|
<span class="StyleInfoLib">Pays :</span> <span><?php print $result->Service_Log->Country; ?></span>
|
||||||
<ol>
|
<ol>
|
||||||
<?php
|
<?php
|
||||||
$count = count($result->CompanyMatches->Company);
|
$count = count($result->CompanyMatches->Company);
|
||||||
|
@ -5,22 +5,14 @@ if(!isset($mode)){
|
|||||||
|
|
||||||
if($mode=='normal'){
|
if($mode=='normal'){
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<div class="fieldgrp">
|
||||||
$(document).ready(function(){
|
<label class="StyleInfoLib">Pays : </label>
|
||||||
$('#pays').change(function(){
|
<div class="field">
|
||||||
$('#method').html('<p><img src="./img/ajax/19-1.gif" /></p>');
|
<select id="pays" name="frmRecherche[Country]" size="10">
|
||||||
var pays = $('#pays :selected').val();
|
|
||||||
$('#method').load('./pages/graydon/methodfield.php', {'pays':pays});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<input type="hidden" name="mode" value="normal">
|
|
||||||
<label class="StyleInfoLib">Pays :</label>
|
|
||||||
<select id="pays" name="frmRecherche[Country]">
|
|
||||||
<option value="">Sélectionner un pays</option>
|
|
||||||
<?php require_once 'graydon/pays.php';?>
|
<?php require_once 'graydon/pays.php';?>
|
||||||
</select>
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div id="method">
|
<div id="method">
|
||||||
<?php
|
<?php
|
||||||
if(isset($method)){
|
if(isset($method)){
|
||||||
@ -28,17 +20,17 @@ if(isset($method)){
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="submit"><p class="submit-button"><input type="submit" value="Rechercher" /></p></div>
|
||||||
<label> </label><input type="submit" value="Rechercher" />
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
}elseif($mode=='demo'){
|
}elseif($mode=='demo'){
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<input type="hidden" name="mode" value="demo">
|
<div class="fieldgrp">
|
||||||
<label>Pays :</label>
|
<label>Pays : </label>
|
||||||
<select name="frmDemo[Country]">
|
<div class="field">
|
||||||
|
<select name="frmDemo[Country]" size="10">
|
||||||
<option value="Austria">Austria</option>
|
<option value="Austria">Austria</option>
|
||||||
<option value="Belgium">Belgium</option>
|
<option value="Belgium">Belgium</option>
|
||||||
<option value="Bulgaria">Bulgaria</option>
|
<option value="Bulgaria">Bulgaria</option>
|
||||||
@ -69,7 +61,9 @@ if(isset($method)){
|
|||||||
<option value="United Kingdom">United Kingdom</option>
|
<option value="United Kingdom">United Kingdom</option>
|
||||||
<option value="USA">USA</option>
|
<option value="USA">USA</option>
|
||||||
</select>
|
</select>
|
||||||
<label> </label><input type="submit" value="Rechercher" />
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="submit"><p class="submit-button"><input type="submit" class="submit" value="Rechercher" /></p></div>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ require_once(realpath(dirname(__FILE__).'/../../includes/siren.php'));
|
|||||||
<link rel="stylesheet" type="text/css" href="./css/menu.css" />
|
<link rel="stylesheet" type="text/css" href="./css/menu.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="./css/jquery.autocomplete.css" />
|
<link rel="stylesheet" type="text/css" href="./css/jquery.autocomplete.css" />
|
||||||
<?php
|
<?php
|
||||||
if($page=='international_recherche'){
|
if($page=='international_recherche' || $page=='international_identite' || $page=='international_identitec'){
|
||||||
?>
|
?>
|
||||||
<link rel="stylesheet" type="text/css" href="./css/international.css" />
|
<link rel="stylesheet" type="text/css" href="./css/international.css" />
|
||||||
<?php
|
<?php
|
||||||
@ -39,8 +39,8 @@ if($page2=='saisie.php'){
|
|||||||
?>
|
?>
|
||||||
<script type="text/javascript" src="./js/saisieajax.js"></script>
|
<script type="text/javascript" src="./js/saisieajax.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="./css/jquery.autocomplete2.css" />
|
<link rel="stylesheet" type="text/css" href="./css/jquery.autocomplete2.css" />
|
||||||
<link rel="stylesheet" href="./css/saisie.css" type="text/css" media="screen" />
|
<link rel="stylesheet" href="./css/saisie.css" type="text/css" />
|
||||||
<link rel="stylesheet" href="./css/thickbox.css" type="text/css" media="screen" />
|
<link rel="stylesheet" href="./css/thickbox.css" type="text/css" />
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -83,7 +83,7 @@ if ($sortie<>'pdf' && $sortie<>'prt') {
|
|||||||
<td valign="top">
|
<td valign="top">
|
||||||
<?include($page2)?>
|
<?include($page2)?>
|
||||||
</td>
|
</td>
|
||||||
</tr><
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user