2010-11-22 12:50:12 +00:00
|
|
|
<?php
|
|
|
|
class IndexController extends Zend_Controller_Action
|
|
|
|
{
|
|
|
|
|
|
|
|
public function indexAction()
|
|
|
|
{
|
2012-01-21 20:32:03 +00:00
|
|
|
$request = $this->getRequest();
|
|
|
|
$page = $request->getParam('page');
|
|
|
|
if ($page == 'annonces')
|
|
|
|
{
|
|
|
|
$siret = $request->getParam('siret');
|
|
|
|
$source = $request->getParam('source');
|
|
|
|
$idAnn = $request->getParam('idAnn');
|
|
|
|
$lien = '/juridique/annonces/siret/'.$siret;
|
|
|
|
if (!empty($source)) $lien.= '/source/'.$source;
|
|
|
|
if (!empty($idAnn)) $lien.= '/idAnn/'.$idAnn;
|
|
|
|
$this->_redirect($lien);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$this->_forward('entreprise', 'recherche');
|
|
|
|
}
|
2010-11-22 12:50:12 +00:00
|
|
|
}
|
2011-01-07 17:16:07 +00:00
|
|
|
|
2012-03-22 08:31:33 +00:00
|
|
|
/**
|
|
|
|
* Retourne l'url pour le csv d'export du portefeuille
|
|
|
|
*/
|
2011-09-07 14:47:23 +00:00
|
|
|
public function portefeuillecsvAction()
|
|
|
|
{
|
|
|
|
$this->_helper->layout()->disableLayout();
|
|
|
|
$this->_helper->viewRenderer->setNoRender(true);
|
|
|
|
|
|
|
|
require_once 'Scores/WsScores.php';
|
|
|
|
require_once 'Scores/Utilisateur.php';
|
|
|
|
|
|
|
|
$user = new Utilisateur();
|
|
|
|
$login = $user->getLogin();
|
|
|
|
$idClient = $user->getIdClient();
|
|
|
|
|
|
|
|
$ws = new WsScores();
|
|
|
|
$reponse = $ws->getPortefeuilleCsv($login, $idClient);
|
|
|
|
|
|
|
|
if ($reponse === false){
|
|
|
|
echo "Erreur";
|
|
|
|
} elseif (!empty($reponse->result->Url)) {
|
|
|
|
echo $reponse->result->Url;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-11-22 12:50:12 +00:00
|
|
|
}
|
|
|
|
|