41 lines
897 B
PHP
41 lines
897 B
PHP
<?php
|
|
class IndexController extends Zend_Controller_Action
|
|
{
|
|
public function init()
|
|
{
|
|
/* Initialize action controller here */
|
|
}
|
|
|
|
public function indexAction()
|
|
{
|
|
$this->_forward('entreprise', 'recherche');
|
|
}
|
|
|
|
public function portefeuillecsvAction()
|
|
{
|
|
$this->_helper->layout()->disableLayout();
|
|
$this->_helper->viewRenderer->setNoRender(true);
|
|
|
|
require_once 'Scores/WsScores.php';
|
|
require_once 'Scores/Utilisateur.php';
|
|
|
|
$this->path = APPLICATION_PATH.'/../cache/surveillance';
|
|
$this->filetime = 8;
|
|
|
|
$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;
|
|
}
|
|
}
|
|
|
|
}
|
|
|