2011-02-21 08:45:13 +00:00
|
|
|
<?php
|
|
|
|
class DirigeantController extends Zend_Controller_Action
|
|
|
|
{
|
2011-04-19 06:23:20 +00:00
|
|
|
protected $siret;
|
|
|
|
protected $id;
|
|
|
|
|
|
|
|
public function init()
|
|
|
|
{
|
|
|
|
$request = $this->getRequest();
|
|
|
|
$this->siret = $request->getParam('siret');
|
|
|
|
$this->id = $request->getParam('id', 0);
|
2011-06-07 09:54:28 +00:00
|
|
|
|
2011-04-20 09:33:40 +00:00
|
|
|
require_once 'Scores/WsScores.php';
|
|
|
|
require_once 'Scores/SessionEntreprise.php';
|
2011-04-20 07:36:55 +00:00
|
|
|
require_once 'common/dates.php';
|
2011-04-19 06:23:20 +00:00
|
|
|
}
|
2011-02-21 08:45:13 +00:00
|
|
|
|
2011-04-11 14:19:14 +00:00
|
|
|
public function indexAction(){}
|
2011-04-19 06:23:20 +00:00
|
|
|
|
2011-06-07 09:54:28 +00:00
|
|
|
/**
|
|
|
|
* Affichage de la liste des dirigeants
|
|
|
|
*/
|
2011-04-19 06:23:20 +00:00
|
|
|
public function listeAction()
|
|
|
|
{
|
|
|
|
$siren = substr($this->siret, 0, 9);
|
|
|
|
$ws = new WsScores();
|
|
|
|
$infos = $ws->getDirigeants($siren);
|
2011-08-19 12:31:51 +00:00
|
|
|
|
|
|
|
if ($infos === false){
|
|
|
|
$this->_forward('soap', 'error');
|
|
|
|
}
|
|
|
|
|
2011-04-20 07:36:55 +00:00
|
|
|
$dirigeants = $infos->result->item;
|
2011-04-20 09:33:40 +00:00
|
|
|
|
|
|
|
$session = new SessionEntreprise($this->siret, $this->id);
|
|
|
|
|
|
|
|
$this->view->assign('siren', $siren);
|
2011-04-20 13:41:43 +00:00
|
|
|
$this->view->assign('siret', $this->siret);
|
2011-04-20 09:33:40 +00:00
|
|
|
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
2011-04-20 07:36:55 +00:00
|
|
|
$this->view->assign('dirigeants', $dirigeants);
|
2011-06-07 15:01:03 +00:00
|
|
|
|
2011-06-22 15:09:06 +00:00
|
|
|
$this->view->assign('AutrePage', $this->getRequest()->getParam('apage'));
|
2011-04-19 06:23:20 +00:00
|
|
|
}
|
|
|
|
|
2011-06-07 09:54:28 +00:00
|
|
|
/**
|
|
|
|
* Affichage de l'historiques des dirigeants
|
|
|
|
*/
|
2011-04-19 06:23:20 +00:00
|
|
|
public function histoAction()
|
|
|
|
{
|
|
|
|
$siren = substr($this->siret, 0, 9);
|
2011-04-20 09:33:40 +00:00
|
|
|
|
2011-04-19 06:23:20 +00:00
|
|
|
$ws = new WsScores();
|
|
|
|
$infos = $ws->getDirigeants($siren, true);
|
2011-08-19 12:31:51 +00:00
|
|
|
|
|
|
|
if ($infos === false){
|
|
|
|
$this->_forward('soap', 'error');
|
|
|
|
}
|
|
|
|
|
2011-04-20 07:36:55 +00:00
|
|
|
$dirigeants = $infos->result->item;
|
2011-04-20 09:33:40 +00:00
|
|
|
|
|
|
|
$session = new SessionEntreprise($this->siret, $this->id);
|
|
|
|
|
|
|
|
$this->view->assign('dirigeants', $dirigeants);
|
|
|
|
$this->view->assign('siren', $siren);
|
2011-04-20 13:41:43 +00:00
|
|
|
$this->view->assign('siret', $this->siret);
|
2011-04-20 09:33:40 +00:00
|
|
|
$this->view->assign('raisonSociale', $session->getRaisonSociale());
|
2011-04-19 06:23:20 +00:00
|
|
|
$this->view->assign('infos', $infos);
|
|
|
|
}
|
2011-04-11 14:19:14 +00:00
|
|
|
|
2011-02-21 08:45:13 +00:00
|
|
|
}
|