extranet/application/controllers/WorldcheckController.php
Aram HARUTYUNYAN a074251cc9 Issue #0001653:
2013-07-19 13:58:24 +00:00

60 lines
1.5 KiB
PHP

<?php
class WorldcheckController extends Zend_Controller_Action
{
protected $siret;
protected $id;
public function init()
{
require_once '/WorldCheck/WsWorldCheck.php';
}
/**
*
*/
public function indexAction()
{
$message = '';
$this->_helper->layout()->disableLayout();
$request = $this->getRequest();
$param->dirNom = 'HOLLANDE'; //$request->getParam('dirNom');
$param->dirPrenom = ''; //$request->getParam('dirPrenom');
$param->dirNaissJJ = $request->getParam('dirNaissJJ');
$param->dirDateNaissMM = $request->getParam('dirDateNaissMM');
$param->dirDateNaissAAAA = $request->getParam('dirDateNaissAAAA');
$param->dirCpVille = $request->getParam('dirCpVille');
$data->customId1 = '1';
$data->customId2 = '2';
$data->name = $param->dirNom.' '.$param->dirPrenom;
$data->nameType = 'INDIVIDUAL';
$wc = new WsWorldCheck();
$nameIdentifier = $wc->getScreener($data);
$matchCount = new stdClass();
$matchCount = $wc->getDetailsName($nameIdentifier);
if ($matchCount->unresolvedMatchCount == 0)
{
$message = 'Aucun résultat.';
}
else
{
$message = 'Résultats de recherche';
$matches = $wc->getMatchesName($nameIdentifier, 'WATCHLIST', 0, $matchCount->unresolvedMatchCount);
}
$this->view->assign('message', $message);
$this->view->assign('param', $param);
$this->view->assign('matches', $matches);
$this->view->assign('nameIdentifier', $nameIdentifier);
}
public function matchresultAction()
{
}
}