Issue #0001653: add recherche WorldCheck page

This commit is contained in:
Aram HARUTYUNYAN 2013-08-28 12:25:24 +00:00
parent b226fd28ad
commit 0212e8e6ea
14 changed files with 379 additions and 102 deletions

View File

@ -40,6 +40,7 @@ class DirigeantController extends Zend_Controller_Action
$session = new SessionEntreprise($this->siret, $this->id);
$user = new Scores_Utilisateur();
$permission = $user->getIdClient(); // change to $permission = $user->checkPerm('WORLDCHECK');
if ($user->checkPerm('dirigeantsop')){
$href = $this->view->url(array('controller'=>'dirigeant', 'action'=>'op', 'siret'=>$this->siret));
$this->view->assign('dirigeantsop', $href);
@ -54,7 +55,7 @@ class DirigeantController extends Zend_Controller_Action
$this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('dirigeants', $dirigeants);
$this->view->assign('exportObjet', $dirigeants);
$this->view->assign('idClient', $user->getIdClient());
$this->view->assign('permission', $permission);
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
$this->view->assign('surveillance', $user->checkPerm('survdirigeants'));

View File

@ -86,20 +86,21 @@ class IdentiteController extends Zend_Controller_Action
);
$datemajTexte = $dateDerMaj = '';
$datemajTexte.= '<table>';
$wdate = new WDate();
foreach ( $tabDate as $dateId => $dateLib ) {
if ( isset($infos->{$dateId})
&& !empty($infos->{$dateId})
&& $infos->{$dateId}!='0000-00-00') {
if ( $dateId == 'DateMajID') {
$dateDerMaj = ' le '.WDate::dateT('Y-m-d', 'd/m/Y', $infos->DateMajID);
$dateDerMaj = ' le '.$wdate->dateT('Y-m-d', 'd/m/Y', $infos->DateMajID);
}
if ( $dateId == 'DateMajID' && !$user->checkModeEdition()) {
} else {
$datemajTexte.= '<tr>';
$datemajTexte.= '<td>'.$dateLib.'</td>';
$datemajTexte.= '<td>'.WDate::dateT('Y-m-d', 'd/m/Y', $infos->{$dateId}).'</td>';
$datemajTexte.= '<td>'.$wdate->dateT('Y-m-d', 'd/m/Y', $infos->{$dateId}).'</td>';
$datemajTexte.= '</tr>';
}
@ -159,6 +160,17 @@ class IdentiteController extends Zend_Controller_Action
'label' => 'Logo',
'texte' => $logo->affiche(),
);
$permission = $user->getIdClient(); // change to $permission = $user->checkPerm('WORLDCHECK');
$data = new stdClass();
$data->org->Nom = $infos->Nom;
$data->org->Societe = $infos->Nom;
$wcLocal = new Application_Model_Worldcheck();
$occurrence = $wcLocal->getCounts($data);
$this->view->assign('occurrence', $occurrence);
$this->view->assign('permission', $permission);
$this->view->assign('exportObjet', $infos);
$this->view->assign('dBlock', $dBlock);

View File

@ -52,6 +52,20 @@ class RechercheController extends Zend_Controller_Action
}
$this->view->assign('form', $form);
}
/**
* Affiche le formulaire de recherche WorldCheck
*/
public function worldcheckAction()
{
$request = $this->getRequest();
$this->view->headTitle()->append('Recherche WorldCheck');
$form = new Application_Form_RechercheWorldcheck();
if ( $request->isPost() || $request->isGet() ){
$form->populate($request->getParams());
}
$this->view->assign('form', $form);
}
/**
* Affiche le formulaire de recherche actionnaire
@ -338,6 +352,10 @@ class RechercheController extends Zend_Controller_Action
$action = 'actionnaire';
$listParams = array('siret', 'actNomRs', 'cpVille', 'pays', 'cpVille', 'pctMin', 'pctMax');
break;
case 'wcheck':
$action = 'worldcheck';
$listParams = array('dirNom', 'dirPrenom', 'dirType');
break;
}
$rechercheParams = new RechercheHistorique();
@ -348,7 +366,7 @@ class RechercheController extends Zend_Controller_Action
$nbField = count($listParams);
foreach($listParams as $key){
if(!empty($params[$key])){
$params[$key] = strip_tags($params[$key]);
$params[$key] = strip_tags($params[$key]);
} else {
$nbField--;
}
@ -356,6 +374,18 @@ class RechercheController extends Zend_Controller_Action
if ($nbField==0){
$this->_redirect('/recherche/'.$action);
}
//Worldcheck - Vérification si les champs demandés (NOM et TYPE) ont été saisie
if ($type=='wcheck')
{
$required = array('dirNom', 'dirType');
foreach($required as $item){
if(empty($params[$item])){
$this->_redirect('/recherche/worldcheck');
break;
}
}
}
//Redirection
$token = $rechercheParams->save($type, $params);
@ -373,7 +403,10 @@ class RechercheController extends Zend_Controller_Action
if( !empty($params['pays']) && $type == 'ent' ){
Zend_Registry::get('firebug')->info('RECHERCHE GIANT');
$this->_forward('search', 'giant', null, $params);
//Recherche
//Worldcheck
} elseif ($type == 'wcheck' ) {
$this->_forward('index', 'worldcheck', null, $params);
//Recherche
} else {
$user = new Scores_Utilisateur();

View File

@ -29,7 +29,8 @@ class WorldcheckController extends Zend_Controller_Action
$wc = new WsWorldCheck();
$wcLocal = new Application_Model_Worldcheck();
if (!$user->getScreenerName() || $user->getScreenerName()!=$param->dirNom)
//check worldcheck data correctness in the session
if (!$user->getScreenerName() || $user->getScreenerName()!=$param->dirNom || substr($user->getScreenerNameIdentifier(),0,3)!='so_' || $user->getNameType()!=$param->dirType)
{
$idClient = $user->getIdClient();
$localDBParams = $wcLocal->getScreenerId($idClient, $data);

View File

@ -14,7 +14,7 @@ class Application_Model_Worldcheck extends Zend_Db_Table_Abstract
{
$result = new stdClass();
$sql = $this->select()
->where("idClient='".$idClient."' AND name='".$data->name."'")
->where("idClient='".$idClient."' AND name='".$data->name."' AND nameType='".$data->nameType."' AND LEFT(nameIdentifier, 3)='so_'")
->order('dateInsert DESC');
if ($this->fetchRow($sql))
{
@ -40,16 +40,17 @@ class Application_Model_Worldcheck extends Zend_Db_Table_Abstract
/**
* Return array of names with matchCount
* @param object $dirigeants
* @param object $data (Nom, Societe)
* @return array
*/
public function getCounts($dirigeants)
public function getCounts($data)
{
$allOccurences = array();
foreach ($dirigeants as $dir)
foreach ($data as $dir)
{
$nameType = (isset($dir->Societe) && $dir->Societe!='')?'ORGANISATION':'INDIVIDUAL';
$sql = $this->select()
->where("name='".$dir->Nom."'")
->where("name='".$dir->Nom."' AND nameType='".$nameType."' AND LEFT(nameIdentifier, 3)='so_'")
->group('name');
$matchCount = NULL;

View File

@ -88,7 +88,7 @@ div.img {background:url(/themes/default/images/worldcheck/wc.png) no-repeat; hei
<?php } ?>
<?php } ?>
</td>
<td><?php if($this->idClient==1) { ?>
<td><?php if($this->permission==1) { ?>
<?php
if ($this->allOccurrences[$dir->Nom]===NULL) {
$qtipContent = "WorldCheck<br/>Cliquez sur l&rsquo;icone WorldCheck";

View File

@ -32,7 +32,45 @@
<?php }?>
<?php }?>
<div style='margin-right:10px; float:right'>
<?php if($this->permission==1) { ?>
<?php
foreach ($this->occurrence as $organisation => $count){
if ($count===NULL) {
$qtipContent = "WorldCheck<br/>Cliquez sur l&rsquo;icone WorldCheck";
} else {
$qtipContent = "WorldCheck<br/>Occurrences: ".$count;
}
?>
<a class='wcheck' tooltip='<?=$qtipContent ?>' href="<?=$this->url(array(
'controller' => 'worldcheck',
'action' => 'index',
'dirNom' => $organisation,
'dirType' => 'ORGANISATION'), null, true)?>" style="cursor: pointer;" >
<div class='txt'>WorldCheck&nbsp;</div> <div id='<?=$count;?>' class='img'></div></a><br/>
<?php }?>
</div>
<style>
div.img {background:url(/themes/default/images/worldcheck/wc.png) no-repeat; height:25px; width:25px; float:left;}
div.txt {line-height:25px; float:left;}
</style>
<script>
$(document).ready(function(){
$('a.wcheck div').each(function(){
if ($(this).attr('id')=='0') {
$(this).css("backgroundImage", 'url(/themes/default/images/worldcheck/wc0.png)');
}
});
});
$('a.wcheck').each(function(){
$(this).qtip({
content: $(this).attr('tooltip'),
position: { at: "right center", my: "bottom left" }
});
});
</script>
<?php }?>
<?php if ( empty($this->AutrePage) ) {?>
<h1 class="titre">FICHE D'IDENTIT&Eacute;</h1>
<?php }?>

View File

@ -113,6 +113,38 @@
<?php
break;
//Affichage recherche worldcheck
case 'wcheck':
?>
<p>RECHERCHE WORLDCHECK :</p>
<?php if (!empty($histo['params']['dirNom'])) {?>Nom : <?=$histo['params']['dirNom']?><br/><?php } ?>
<?php if (!empty($histo['params']['dirPrenom'])) {?>Prenom : <?=$histo['params']['dirPrenom']?><br/><?php } ?>
<?php if (!empty($histo['params']['dirType'])) {?>Type : <?=$histo['params']['dirType']?><br/><?php } ?>
<?php if (isset($histo['consult'])) {?>
<a href="<?=$this->url(array(
'controller' => 'identite',
'action' => 'fiche',
'siret' => $histo['consult']['siret'],
'id' => $histo['consult']['id'],
))?>">Afficher la fiche identite consulter</a>
<?php }?>
<a href="<?=$this->url(array_merge(
array('controller' => 'recherche', 'action' => 'liste'),
array_merge($histo['params'], array('type'=>$histo['type'])))
)?>">Lancer la recherche</a>
-
<a href="<?=$this->url(array_merge(
array('controller' => 'recherche', 'action' => 'worldcheck'),
$histo['params'])
)?>">Afficher le formulaire</a>
<?php
break;
case 'annonce':
default: break;
}

View File

@ -0,0 +1,21 @@
<?php
$form = $this->form;
?>
<div id="center-recherche">
<div id="recherche">
<h3>RECHERCHE WORLDCHECK</h3>
<form class="recherche" name="<?php echo $form->getName()?>"
method="<?php echo $form->getMethod()?>" action="<?php echo $form->getAction()?>">
<?php echo $form->type?>
<div class="row"><?php echo $form->dirNom?></div>
<div class="row"><?php echo $form->dirPrenom?></div>
<div class="row"><?php echo $form->dirType?></div>
<div class="row submit">
<?php echo $form->submit?>
<?php echo $form->reset?>
</div>
</form>
</div>
</div>

View File

@ -10,7 +10,6 @@
<?php
require_once 'common/dates.php';
$wdate = new WDate();
$content = array();
if (!$this->content)
{
?>
@ -30,29 +29,29 @@ else
<td class="StyleInfoData"><div class="wrap"><?=ucfirst(strtolower($content[0]->category));?></div></td>
</tr>
<?php } ?>
<?php if (isset($content[0]->gender)) { ?>
<?php
if (isset($content[0]->names->name)){?>
<tr>
<td class="StyleInfoLib" width="150">Gender</td>
<td class="StyleInfoData"><div class="wrap"><?=ucfirst(strtolower($content[0]->gender));?></div></td>
</tr>
<td class="StyleInfoLib" width="150">All names</td>
<td class="StyleInfoData"><div class="wrap">
<?php
foreach($content[0]->names->name as $name)
{
if (isset($name->fullName) && $name->fullName!='') {echo $name->fullName.'<br/>';}
} ?>
</div></td></tr>
<?php } ?>
<?php if (isset($content[0]->gender)) { ?>
<tr><td class="StyleInfoLib" width="150">Gender</td>
<td class="StyleInfoData"><div class="wrap"><?=ucfirst(strtolower($content[0]->gender));?></div></td></tr>
<?php } ?>
<?php if (isset($content[0]->events->event) && ($content[0]->events->event[0]->day>0) && ($content[0]->events->event[0]->month>0) && ($content[0]->events->event[0]->year>0)) { ?>
<tr>
<td class="StyleInfoLib" width="150">Birthday</td>
<td class="StyleInfoData"><div class="wrap"><?=$wdate->dateT('Y-m-d', 'd/m/Y', $content[0]->events->event[0]->fullDate);?></div></td>
</tr>
<tr><td class="StyleInfoLib" width="150">Birthday</td>
<td class="StyleInfoData"><div class="wrap"><?=$wdate->dateT('Y-m-d', 'd/m/Y', $content[0]->events->event[0]->fullDate);?></div></td></tr>
<?php } ?>
<?php if (isset($content[0]->events->event[0]->address->region)) { ?>
<tr>
<td class="StyleInfoLib" width="150">Birth place</td>
<td class="StyleInfoData"><div class="wrap"><?=$content[0]->events->event[0]->address->region;?></div></td>
</tr>
<?php } ?>
<?php if (isset($content[0]->countryLinks->countryLink[0]->countryText)) { ?>
<tr>
<td class="StyleInfoLib" width="150">Nationality</td>
<td class="StyleInfoData"><div class="wrap"><?=ucfirst(strtolower($content[0]->countryLinks->countryLink[0]->countryText));?></div></td>
</tr>
<tr><td class="StyleInfoLib" width="150">Birth place</td>
<td class="StyleInfoData"><div class="wrap"><?=$content[0]->events->event[0]->address->region;?></div></td></tr>
<?php } ?>
<?php
foreach($content[0]->details->detail as $detail)
@ -62,35 +61,61 @@ foreach($content[0]->details->detail as $detail)
<td class="StyleInfoLib" width="150"><?=ucfirst(strtolower($detail->detailType));?></div></td>
<td class="StyleInfoData"><div class="wrap"><?=$detail->text;?></td>
</tr>
<?php } ?>
<?php } ?>
<tr>
<td class="StyleInfoLib" width="150">Address</td>
<td class="StyleInfoData"><div class="wrap">
<?php }} ?>
<?php
if (isset($content[0]->addresses->address[0])){
foreach($content[0]->addresses->address as $address) {
$fullAddress = array();
if (isset($address->city)) { $fullAddress[] = $address->city;}
if (isset($address->region)) { $fullAddress[] = $address->region;}
if (isset($address->country)) { $fullAddress[] = ucfirst(strtolower($address->country->name));}
?>
<?=implode(', ', $fullAddress);?>
<tr><td class="StyleInfoLib" width="150">All Addresses</td>
<td class="StyleInfoData"><div class="wrap">
<?php
foreach($content[0]->addresses->address as $address) {
$fullAddress = array();
if (isset($address->city)) { $fullAddress[] = $address->city;}
if (isset($address->region)) { $fullAddress[] = $address->region;}
if (isset($address->country)) { $fullAddress[] = ucfirst(strtolower($address->country->name));}
echo implode(', ', $fullAddress);?>
<br/>
<?php unset($fullAddress); }}?>
</div></td>
<?php unset($fullAddress); }?>
</div></td></tr>
<?php } ?>
<?php
if (isset($content[0]->actionDetails->actionDetail)){
foreach($content[0]->actionDetails->actionDetail as $actionDetail)
{?>
<tr><td class="StyleInfoLib" width="150"><?=ucfirst(strtolower($actionDetail->actionType)); ?></td>
<td class="StyleInfoData"><div class="wrap"><?=$actionDetail->text;?></div></td></tr>
<tr><td class="StyleInfoLib" width="150">Source</td>
<td class="StyleInfoData"><div class="wrap"><?=$actionDetail->source->name.' ('.$actionDetail->source->abbreviation.')';?></div></td></tr>
<?php }} ?>
<?php
foreach($content[0]->countryLinks->countryLink as $countryLink)
{ ?>
<?php if (isset($countryLink->countryText)) { ?>
<tr>
<td class="StyleInfoLib" width="150"><?php echo ($countryLink->countryLinkType=='NATIONALITY')?'Nationality':'Registered in'?></div></td>
<td class="StyleInfoData"><div class="wrap"><?=ucfirst(strtolower($countryLink->countryText)).' ('.$countryLink->country->code.')';?></td>
</tr>
<?php } ?>
<?php } ?>
<?php
if (isset($content[0]->sources->sourceDetail)){
foreach($content[0]->sources->sourceDetail as $source)
{
if (isset($source->name) && $source->name!='') { ?>
<tr><td class="StyleInfoLib" width="150"><?=$source->ProviderSourceTypeDetail->category->name?></td>
<td class="StyleInfoData"><div class="wrap"><?=$source->ProviderSourceTypeDetail->category->description;?></div></td></tr>
<tr><td class="StyleInfoLib" width="150">Source</td>
<td class="StyleInfoData"><div class="wrap"><?=$source->name.' ('.$source->abbreviation.')';?></div></td></tr>
<?php }}} ?>
<?php
if (isset($content[0]->roles->role)){
foreach($content[0]->roles->role as $role)
{ ?>
<?php if (isset($role->title) && $role->title!='') { ?>
<tr>
<td class="StyleInfoLib" width="150"><?=$role->type?></td>
<td class="StyleInfoData"><div class="wrap"><?=$role->title;?></div></td>
</tr>
<?php } ?>
<?php }} ?>
{
if (isset($role->title) && $role->title!='') { ?>
<tr><td class="StyleInfoLib" width="150"><?=$role->type?></td>
<td class="StyleInfoData"><div class="wrap"><?=$role->title;?></div></td></tr>
<?php }}} ?>
<?php if (isset($content[0]->weblinks->weblink)) { ?>
<tr>
<td class="StyleInfoLib" width="150">Weblinks</td>
@ -140,12 +165,6 @@ Associate: <?=$associate->targetEntity->names->name[0]->fullName;?>
<td class="StyleInfoData"><div class="wrap"><?=$wdate->dateT('Y-m-d', 'd/m/Y', $associate->targetEntity->events->event[0]->fullDate);?></div></td>
</tr>
<?php } ?>
<?php if (isset($associate->targetEntity->countryLinks->countryLink[0]->countryText)) { ?>
<tr>
<td class="StyleInfoLib" width="150">Nationality</td>
<td class="StyleInfoData"><div class="wrap"><?=ucfirst(strtolower($associate->targetEntity->countryLinks->countryLink[0]->countryText));?></div></td>
</tr>
<?php } ?>
<?php
foreach($associate->targetEntity->details->detail as $detailAssoc)
{ ?>
@ -170,8 +189,44 @@ if (isset($address->country)) { $fullAddress[] = ucfirst(strtolower($address->co
<?=implode(', ', $fullAddress);?>
<br/>
<?php unset($fullAddress); }}?>
</div></td>
</div></td></tr>
<?php
if (isset($associate->targetEntity->actionDetails->actionDetail)){
foreach($associate->targetEntity->actionDetails->actionDetail as $actionDetail)
{?>
<tr><td class="StyleInfoLib" width="150"><?=ucfirst(strtolower($actionDetail->actionType)); ?></td>
<td class="StyleInfoData"><div class="wrap"><?=$actionDetail->text;?></div></td></tr>
<tr><td class="StyleInfoLib" width="150">Source</td>
<td class="StyleInfoData"><div class="wrap"><?=$actionDetail->source->name.' ('.$actionDetail->source->abbreviation.')';?></div></td></tr>
<?php }} ?>
<?php
foreach($associate->targetEntity->countryLinks->countryLink as $countryLink)
{ ?>
<?php if (isset($countryLink->countryText)) { ?>
<tr>
<td class="StyleInfoLib" width="150"><?php echo ($countryLink->countryLinkType=='NATIONALITY')?'Nationality':'Registered in'?></div></td>
<td class="StyleInfoData"><div class="wrap"><?=ucfirst(strtolower($countryLink->countryText)).' ('.$countryLink->country->code.')';?></td>
</tr>
<?php } ?>
<?php } ?>
<?php
if (isset($associate->targetEntity->sources->sourceDetail)){
foreach($associate->targetEntity->sources->sourceDetail as $source)
{
if (isset($source->name) && $source->name!='') { ?>
<tr><td class="StyleInfoLib" width="150"><?=$source->ProviderSourceTypeDetail->category->name?></td>
<td class="StyleInfoData"><div class="wrap"><?=$source->ProviderSourceTypeDetail->category->description;?></div></td></tr>
<tr><td class="StyleInfoLib" width="150">Source</td>
<td class="StyleInfoData"><div class="wrap"><?=$source->name.' ('.$source->abbreviation.')';?></div></td></tr>
<?php }}} ?>
<?php
if (isset($associate->targetEntity->roles->role)){
foreach($associate->targetEntity->roles->role as $role)
{
if (isset($role->title) && $role->title!='') { ?>
<tr><td class="StyleInfoLib" width="150"><?=$role->type?></td>
<td class="StyleInfoData"><div class="wrap"><?=$role->title;?></div></td></tr>
<?php }}} ?>
<?php if (isset($associate->targetEntity->weblinks->weblink)) { ?>
<tr>
<td class="StyleInfoLib" width="150">Weblinks</td>
@ -180,8 +235,7 @@ if (isset($address->country)) { $fullAddress[] = ucfirst(strtolower($address->co
{ ?>
<a href="<?=$weblink->URI;?>" target="_blank"><?=$weblink->URI;?></a><br/>
<?php } ?>
</div></td>
</tr>
</div></td></tr>
<?php } ?>
</table></div>
<?php }}} ?>

View File

@ -0,0 +1,74 @@
<?php
class Application_Form_RechercheWorldcheck extends Zend_Form
{
public $elementDecorators = array(
'ViewHelper',
'Errors',
array('HtmlTag', array('tag' => 'div', 'class' => 'field')),
array('Label'),
);
public $buttonDecorators = array(
'ViewHelper'
);
public function init()
{
$this->setName('recherche');
$this->setAction('/recherche/liste');
$this->setMethod('post');
$this->addElement('hidden', 'type', array(
'value' => 'wcheck',
'decorators' => array('ViewHelper'),
));
$this->addElement('text', 'dirNom', array(
'filters' => array('StringTrim'),
'label' => 'NOM',
'required' => 'true',
'decorators' => $this->elementDecorators,
'attribs' => array(
'size' => 30,
'maxlength' => 30,
),
));
$this->addElement('text', 'dirPrenom', array(
'filters' => array('StringTrim'),
'label' => 'PRENOM',
'required' => 'true',
'decorators' => $this->elementDecorators,
'attribs' => array(
'size' => 30,
'maxlength' => 30,
),
));
$this->addElement('select', 'dirType', array(
'decorators' => $this->elementDecorators,
'label' => 'Type',
'style' => 'width:175px;',
'required' => true,
'multiOptions' => array(
'' => '',
'INDIVIDUAL' => 'Individual',
'ORGANISATION' => 'Organisation'),
));
$this->addElement('submit', 'submit', array(
'label' => 'Recherche',
'ignore' => true,
'class' => 'button',
'decorators' => $this->buttonDecorators,
));
$this->addElement('reset', 'reset', array(
'label' => 'Effacer',
'ignore' => true,
'class' => 'button',
'decorators' => $this->buttonDecorators,
));
}
}

View File

@ -33,6 +33,8 @@ class Menu
array('controller'=>'recherche', 'action'=>'annonceliste'),
array('controller'=>'recherche', 'action'=>'enquete'),
array('controller'=>'recherche', 'action'=>'refclientliste'),
array('controller'=>'worldcheck', 'action'=>'index'),
array('controller'=>'worldcheck', 'action'=>'matchcontent'),
array('controller'=>'giant', 'action'=>'search'),
array('controller'=>'giant', 'action'=>'identite'),
array('controller'=>'giant', 'action'=>'commandes'),
@ -72,6 +74,13 @@ class Menu
'forceVisible' => true,
'permission' => 'SEARCHACT',
),
array(
'label' => "Rechercher WorldCheck",
'controller' => 'recherche',
'action' => 'worldcheck',
'forceVisible' => true,
'permission' => 'SEARCHACT', //@TODO replace SEARCHACT with WORLDCHECK permission
),
array(
'label' => "Dernière recherche",
'controller' => 'recherche',

View File

@ -22,6 +22,7 @@ class RechercheHistorique
'ent' => array('siret', 'raisonSociale', 'numero', 'voie', 'cpVille', 'telFax', 'naf', 'pays', 'fj'),
'dir' => array('dirNom', 'dirPrenom', 'dirDateNaissJJ', 'dirDateNaissMM', 'dirDateNaissAAAA', 'dirCpVille'),
'act' => array('actNomRs', 'cpVille', 'siret', 'pays', 'pctMin', 'pctMax'),
'wcheck' => array('dirNom', 'dirPrenom', 'dirType'),
'annonce' => array('formA'),
'refclient' => array('ref'),
);

View File

@ -73,7 +73,7 @@ class WsWorldCheck
* The initial request of Worldcheck to get nameIdentifier.
* nameType available values: 'INDIVIDUAL', 'ORGANISATION'
* @param object $data
* @return NameIdentifier (Unique for each request)
* @return NameIdentifier (Unique for each request, begins with so_n_)
*/
public function getScreener($data)
{
@ -87,7 +87,7 @@ class WsWorldCheck
try {
return $client->screen($params)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -108,7 +108,7 @@ class WsWorldCheck
try {
return $client->getContentSources()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -132,7 +132,7 @@ class WsWorldCheck
if ($nameType=='individual') return $client->getDetails($param)->return->entitySet->entities->individual;
else return $client->getDetails($param)->return->entitySet->entities->organisation;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -158,7 +158,7 @@ class WsWorldCheck
try {
return $client->getSummaries($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -201,7 +201,7 @@ class WsWorldCheck
}
return $allMatches;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -223,7 +223,7 @@ class WsWorldCheck
try {
return $client->getSummariesForMatch($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -248,7 +248,7 @@ class WsWorldCheck
$data->fullName = $client->getSummariesForMatch($param)->return->entitySummaries->categories->category[0]->summaries->summary[0]->names->name[0]->fullName;
return $data;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -274,7 +274,7 @@ class WsWorldCheck
try {
return $client->getTitles($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -296,7 +296,7 @@ class WsWorldCheck
try {
return $client->getTitlesForMatch($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -320,7 +320,7 @@ class WsWorldCheck
try {
return $client->changeMyPassword($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -342,7 +342,7 @@ class WsWorldCheck
try {
return $client->resetPassword($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -364,7 +364,7 @@ class WsWorldCheck
try {
return $client->getUserNames($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -388,7 +388,7 @@ class WsWorldCheck
try {
return $client->getAllGroupConfingVariables($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -411,7 +411,7 @@ class WsWorldCheck
try {
return $client->getGroupConfigVariable($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -436,7 +436,7 @@ class WsWorldCheck
try {
return $client->getGroupConfigVariables($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -461,7 +461,7 @@ class WsWorldCheck
try {
return $client->getStoredNameModel($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -481,7 +481,7 @@ class WsWorldCheck
try {
return $client->getStoredNameModelForAllGroups()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -501,7 +501,7 @@ class WsWorldCheck
try {
return $client->getStoredNameModelGroups()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -521,7 +521,7 @@ class WsWorldCheck
try {
return $client->getUserFilters()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -548,7 +548,7 @@ class WsWorldCheck
try {
return $client->addNote($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -571,7 +571,7 @@ class WsWorldCheck
try {
return $client->archive($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -594,7 +594,7 @@ class WsWorldCheck
try {
return $client->delete($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -619,7 +619,7 @@ class WsWorldCheck
try {
return $client->assign($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -641,7 +641,7 @@ class WsWorldCheck
try {
return $client->unassign($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -666,7 +666,7 @@ class WsWorldCheck
try {
return $client->changeOwner($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -689,7 +689,7 @@ class WsWorldCheck
try {
return $client->getDetails($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -716,7 +716,7 @@ class WsWorldCheck
try {
return $client->getMatches($param)->return->matches;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -748,7 +748,7 @@ class WsWorldCheck
}
return $allMatches;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -771,7 +771,7 @@ class WsWorldCheck
try {
return $client->getSelectableAssignees($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -791,7 +791,7 @@ class WsWorldCheck
try {
return $client->getSelectableGroups()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -814,7 +814,7 @@ class WsWorldCheck
try {
return $client->getSelectableOwners($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -838,7 +838,7 @@ class WsWorldCheck
try {
return $client->saveForOngoingScreening($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -865,7 +865,7 @@ class WsWorldCheck
try {
return $client->acknoledge($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -892,7 +892,7 @@ class WsWorldCheck
try {
return $client->addNote($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -915,7 +915,7 @@ class WsWorldCheck
try {
return $client->getDetails($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -938,7 +938,7 @@ class WsWorldCheck
try {
return $client->getNewUpdatedNameModel($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -958,7 +958,7 @@ class WsWorldCheck
try {
return $client->getNewUpdatedNameModelForAllGroups()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -978,7 +978,7 @@ class WsWorldCheck
try {
return $client->getNewUpdatedNameModelGroups()->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -1001,7 +1001,7 @@ class WsWorldCheck
try {
return $client->getNewUpdatedNames($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();
@ -1027,7 +1027,7 @@ class WsWorldCheck
try {
return $client->resolve($param)->return;
} catch (SoapFault $fault) {
if ( in_array($fault->faultcode, array('ERR', 'MSG')) ){
if ($fault->faultcode){
return $fault->faultstring;
} else {
echo $client->__getLastResponse();