2011-04-15 12:40:29 +00:00
|
|
|
<?php
|
2011-04-19 15:59:50 +00:00
|
|
|
require_once ('Giant/WSgiant.php');
|
|
|
|
require_once ('Giant/Search.lib.php');
|
2011-06-29 14:39:16 +00:00
|
|
|
require_once ('Scores/RechercheHistorique.php');
|
|
|
|
require_once ('Giant/CreditData.lib.php');
|
|
|
|
require_once ('Giant/Controller/RechercheController.php');
|
|
|
|
require_once ('Scores/Utilisateur.php');
|
|
|
|
require_once ('Giant/Functions.php');
|
2011-04-19 15:59:50 +00:00
|
|
|
|
2011-04-26 13:39:19 +00:00
|
|
|
/**
|
|
|
|
* Cette classe gere les méthodes de Giant le nom des méthode de cette classe
|
|
|
|
* doivent êtres en correlation avec les méthodes de giant.
|
2011-06-14 09:45:52 +00:00
|
|
|
*
|
|
|
|
*
|
2011-04-26 13:39:19 +00:00
|
|
|
* @author Lasserre Damien
|
|
|
|
*
|
|
|
|
*/
|
2011-04-15 12:40:29 +00:00
|
|
|
class GiantController extends Zend_Controller_Action
|
|
|
|
{
|
2011-04-19 15:59:50 +00:00
|
|
|
protected $soapClient;
|
|
|
|
protected $Provider;
|
|
|
|
protected $TestIndication;
|
|
|
|
protected $user;
|
2011-04-15 12:40:29 +00:00
|
|
|
|
2011-04-19 15:59:50 +00:00
|
|
|
protected $language;
|
|
|
|
protected $labelResults;
|
2011-04-15 12:40:29 +00:00
|
|
|
|
2011-04-19 15:59:50 +00:00
|
|
|
public function init()
|
|
|
|
{
|
|
|
|
/** @todo provisoir **/
|
|
|
|
$auth = Zend_Auth::getInstance();
|
2011-06-24 15:59:59 +00:00
|
|
|
$entreprise = new RechercheHistorique();
|
2011-04-19 15:59:50 +00:00
|
|
|
$this->user = $auth->getIdentity();
|
2011-06-14 09:45:52 +00:00
|
|
|
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
|
2011-06-29 14:39:16 +00:00
|
|
|
$this->view->debug = false;
|
2011-04-15 12:40:29 +00:00
|
|
|
}
|
|
|
|
|
2011-04-19 15:59:50 +00:00
|
|
|
public function indexAction()
|
2011-06-24 15:59:59 +00:00
|
|
|
{
|
2011-06-29 14:39:16 +00:00
|
|
|
$this->_forward('search');
|
2011-04-19 15:59:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function searchAction()
|
2011-06-27 16:34:26 +00:00
|
|
|
{
|
2011-06-29 14:39:16 +00:00
|
|
|
$rechercheParams = new RechercheHistorique();
|
2011-06-27 16:34:26 +00:00
|
|
|
if (count($rechercheParams->liste()) > 0)
|
|
|
|
{
|
2011-06-14 09:45:52 +00:00
|
|
|
$recherche = $rechercheParams->item(0);
|
2011-06-27 16:34:26 +00:00
|
|
|
$type = $recherche['type'];
|
|
|
|
$params = $recherche['params'];
|
2011-06-14 09:45:52 +00:00
|
|
|
}
|
2011-06-27 16:34:26 +00:00
|
|
|
$search = new GiantRechercheController($params['pays']);
|
|
|
|
$result = $search->Liste($params, $this->getRequest()->getParam('page'));
|
2011-06-29 14:39:16 +00:00
|
|
|
$this->view->label = $search->getObjet()->getLabelDesc();
|
|
|
|
$this->view->labelResults = $search->getObjet()->getLabelResults;
|
2011-06-27 16:34:26 +00:00
|
|
|
$this->view->pays = $params['pays'];
|
2011-06-29 14:39:16 +00:00
|
|
|
$this->view->currentPage = $search->getObjet()->getCurrentPage();
|
2011-06-27 16:34:26 +00:00
|
|
|
$this->view->userMaxResult = $this->user->nbReponses;
|
|
|
|
$this->view->resultats = $result;
|
2011-06-29 14:39:16 +00:00
|
|
|
$this->view->page = $this->getRequest()->getParam('page');
|
|
|
|
$this->view->referer = $search->getObjet()->getQuery();
|
|
|
|
$this->view->lienReferer = $search->getQueryLink($params);
|
|
|
|
if($this->view->debug)
|
|
|
|
$this->view->soap = $search->soapG;
|
2011-04-19 15:59:50 +00:00
|
|
|
}
|
|
|
|
|
2011-06-27 16:34:26 +00:00
|
|
|
public function identiteAction()
|
2011-04-19 15:59:50 +00:00
|
|
|
{
|
2011-06-27 16:34:26 +00:00
|
|
|
$rechercheParams = new RechercheHistorique();
|
|
|
|
|
|
|
|
if (count($rechercheParams->liste()) > 0)
|
|
|
|
{
|
2011-06-14 09:45:52 +00:00
|
|
|
$recherche = $rechercheParams->item(0);
|
2011-06-27 16:34:26 +00:00
|
|
|
$type = $recherche['type'];
|
|
|
|
$params = $recherche['params'];
|
2011-06-14 09:45:52 +00:00
|
|
|
}
|
2011-06-29 14:39:16 +00:00
|
|
|
$ListeRapport = new GiantRechercheController($params['pays']);
|
|
|
|
$result = $ListeRapport->ListeRapport($this->getRequest()->getParam('CompanyId'));
|
|
|
|
|
|
|
|
$this->view->listeRapport = $result;
|
|
|
|
$this->view->CompanyId = $this->getRequest()->getParam('CompanyId');
|
|
|
|
$this->view->raisonSociale = $this->getRequest()->getParam('raisonSociale');
|
|
|
|
$this->view->CompanyRegisterNumber = $this->getRequest()->getParam('CompanyRegisterNumber');
|
|
|
|
$this->view->Pays = $this->getRequest()->getParam('Pays');
|
|
|
|
$this->view->Adresse = explode(':', $this->getRequest()->getParam('Adresse'));
|
2011-04-19 15:59:50 +00:00
|
|
|
}
|
|
|
|
|
2011-06-14 09:45:52 +00:00
|
|
|
public function __destruct()
|
2011-04-19 15:59:50 +00:00
|
|
|
{
|
|
|
|
unset($_SESSION['recherche']['giant']);
|
|
|
|
}
|
2011-04-15 12:40:29 +00:00
|
|
|
}
|