Giant modif

This commit is contained in:
Damien LASSERRE 2011-06-29 14:39:16 +00:00
parent 0eb87189a0
commit 10a13eaefd
3 changed files with 51 additions and 31 deletions

View File

@ -0,0 +1,23 @@
<?php
class DebugController extends Zend_Controller_Action
{
public function init()
{
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
$this->view->headScript()->appendFile('/themes/default/scripts/giant.js', 'text/javascript');
}
public function identiteAction()
{
$menu = array('Objet', 'Requete XML', 'Reponse XML');
$request = $this->getRequest();
$soap = $request->getParam('soap');
$this->view->resultat = $request->getParam('resultat');
$this->view->menu = $menu;
$this->view->requestXML = $soap->getLastRequest();
$this->view->responseXML = $soap->getLastResponse();
}
}

View File

@ -1,9 +1,11 @@
<?php
require_once ('Giant/WSgiant.php');
require_once ('Giant/Search.lib.php');
require_once('Scores/RechercheHistorique.php');
require_once 'Giant/CreditData.lib.php';
require_once 'Giant/Controller/RechercheController.php';
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');
/**
* Cette classe gere les méthodes de Giant le nom des méthode de cette classe
@ -30,28 +32,17 @@ class GiantController extends Zend_Controller_Action
$entreprise = new RechercheHistorique();
$this->user = $auth->getIdentity();
$this->view->headLink()->appendStylesheet('/themes/default/styles/giant.css', 'all');
if($this->getRequest()->getActionName() != 'search' and isset($_SESSION['recherche']['giant']['page']))
unset($_SESSION['recherche']['giant']['page']);
$this->view->debug = false;
}
public function indexAction()
{
$rechercheParams = new RechercheHistorique();
if (count($rechercheParams->liste()) > 0)
{
$recherche = $rechercheParams->item(0);
$type = $recherche['type'];
$params = $recherche['params'];
}
$siret = $params['siret'];
if(empty($siret)) $this->_forward('search');
else $this->_forward('identite');
$this->_forward('search');
}
public function searchAction()
{
$rechercheParams = new RechercheHistorique();
$rechercheParams = new RechercheHistorique();
if (count($rechercheParams->liste()) > 0)
{
$recherche = $rechercheParams->item(0);
@ -60,13 +51,17 @@ class GiantController extends Zend_Controller_Action
}
$search = new GiantRechercheController($params['pays']);
$result = $search->Liste($params, $this->getRequest()->getParam('page'));
$this->view->label = $search->Search->getLabelDesc();
$this->view->labelResults = $search->Search->getLabelResults;
$this->view->label = $search->getObjet()->getLabelDesc();
$this->view->labelResults = $search->getObjet()->getLabelResults;
$this->view->pays = $params['pays'];
$this->view->currentPage = $search->Search->getCurrentPage();
$this->view->currentPage = $search->getObjet()->getCurrentPage();
$this->view->userMaxResult = $this->user->nbReponses;
$this->view->resultats = $result;
$this->view->referer = $search->Search->getQuery();
$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;
}
public function identiteAction()
@ -79,13 +74,15 @@ class GiantController extends Zend_Controller_Action
$type = $recherche['type'];
$params = $recherche['params'];
}
$identite = new GiantRechercheController($params['pays']);
$result = $identite->Identite($this->getRequest()->getParam('companyId'), $this->getRequest()->getParam('pays'));
$ListeRapport = $identite->ListeRapport($this->getRequest()->getParam('companyId'));
$this->view->resultats = $result;
$this->view->listeRapport = $ListeRapport;
$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'));
}
public function __destruct()

View File

@ -155,8 +155,8 @@ class RechercheController extends Zend_Controller_Action
}
//Giant
if( isset($params['pays']) && !empty($params['pays']) ){
$this->_forward('index', 'giant');
if( !empty($params['pays']) ){
$this->_forward('search', 'giant');
}
$page = $request->getParam('page', 1);
@ -265,7 +265,7 @@ class RechercheController extends Zend_Controller_Action
$totPage = $curPage = 1;
}
$liste = array();
foreach($etabs as $i => $etab) {
foreach($etabs as $i => $etab) { //@todo provoque un Warning quand pas de critères.
$item = array();
$item['position'] = (($curPage-1)*$nbReponses)+$i+1;
$item['id'] = $etab->id;