PDF print

This commit is contained in:
Jean Vladimir TWAHIRWA 2016-11-15 10:09:31 +01:00
parent 348319609d
commit 49e2607cb6
7 changed files with 1191 additions and 23 deletions

View File

@ -27,6 +27,11 @@ class Legal_DirigeantController extends Zend_Controller_Action
$siren = substr($this->siret, 0, 9); $siren = substr($this->siret, 0, 9);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
if (empty($autrePage)) { if (empty($autrePage)) {
$this->view->headTitle()->prepend('Liste des dirigeants'); $this->view->headTitle()->prepend('Liste des dirigeants');
$this->view->headTitle()->prepend('Siret '.$this->siret); $this->view->headTitle()->prepend('Siret '.$this->siret);
@ -71,6 +76,11 @@ class Legal_DirigeantController extends Zend_Controller_Action
$this->view->headTitle()->prepend('Historique des dirigeants'); $this->view->headTitle()->prepend('Historique des dirigeants');
$this->view->headTitle()->prepend('Siret '.$this->siret); $this->view->headTitle()->prepend('Siret '.$this->siret);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getDirigeants($siren, true); $infos = $ws->getDirigeants($siren, true);
@ -103,6 +113,11 @@ class Legal_DirigeantController extends Zend_Controller_Action
'class' => 'dialog', 'class' => 'dialog',
)); ));
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$this->view->headTitle()->prepend('Liste des dirigeants opérationnels'); $this->view->headTitle()->prepend('Liste des dirigeants opérationnels');
$this->view->headTitle()->prepend('Siret '.$this->siret); $this->view->headTitle()->prepend('Siret '.$this->siret);

View File

@ -203,11 +203,18 @@ class Legal_EvaluationController extends Zend_Controller_Action
{ {
$this->view->headScript()->appendFile($this->theme->pathScript.'/evaluation.js', 'text/javascript'); $this->view->headScript()->appendFile($this->theme->pathScript.'/evaluation.js', 'text/javascript');
$this->view->InputLinks = array(); $this->view->InputLinks = array();
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP')) { if(!$user->checkPerm('INDISCORE') && !$user->checkPerm('INDISCOREP')) {
$this->forward('perms', 'error'); $this->forward('perms', 'error');
} }
$request = $this->getRequest(); $request = $this->getRequest();
$autrePage = $request->getParam('apage'); $autrePage = $request->getParam('apage');
@ -257,6 +264,11 @@ class Legal_EvaluationController extends Zend_Controller_Action
$this->view->headTitle()->prepend("Rapport de synthèse"); $this->view->headTitle()->prepend("Rapport de synthèse");
$this->view->headTitle()->prepend("Siret ".$this->siret); $this->view->headTitle()->prepend("Siret ".$this->siret);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P')) { if(!$user->checkPerm('INDISCORE2') && !$user->checkPerm('INDISCORE2P')) {
$this->forward('perms', 'error'); $this->forward('perms', 'error');
@ -427,6 +439,11 @@ class Legal_EvaluationController extends Zend_Controller_Action
$this->view->headTitle()->prepend("Rapport complet"); $this->view->headTitle()->prepend("Rapport complet");
$this->view->headTitle()->prepend("Siret ".$this->siret); $this->view->headTitle()->prepend("Siret ".$this->siret);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P')) if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
$this->forward('perms', 'error'); $this->forward('perms', 'error');
@ -1021,6 +1038,11 @@ class Legal_EvaluationController extends Zend_Controller_Action
$this->view->headTitle()->prepend("Valorisation"); $this->view->headTitle()->prepend("Valorisation");
$this->view->headTitle()->prepend("Siret ".$this->siret); $this->view->headTitle()->prepend("Siret ".$this->siret);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P')) if(!$user->checkPerm('INDISCORE3') && !$user->checkPerm('INDISCORE3P'))
$this->_forward('perms', 'error'); $this->_forward('perms', 'error');

View File

@ -32,6 +32,11 @@ class Legal_FinanceController extends Zend_Controller_Action
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
$session = new Scores_Session_Entreprise($this->siret, $this->id); $session = new Scores_Session_Entreprise($this->siret, $this->id);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$request = $this->getRequest(); $request = $this->getRequest();
$typeBilan = $request->getParam('typeBilan', 'N'); $typeBilan = $request->getParam('typeBilan', 'N');
$ratio = $request->getParam('ratio', ''); $ratio = $request->getParam('ratio', '');
@ -213,6 +218,11 @@ class Legal_FinanceController extends Zend_Controller_Action
$typeBilan = $request->getParam('typeBilan', 'N'); $typeBilan = $request->getParam('typeBilan', 'N');
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id); $entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
//Récupération des informations //Récupération des informations
if (empty($autrePage)) { if (empty($autrePage)) {
$this->view->headTitle()->prepend("Bilan, Compte de résultat"); $this->view->headTitle()->prepend("Bilan, Compte de résultat");
@ -461,6 +471,11 @@ class Legal_FinanceController extends Zend_Controller_Action
$request = $this->getRequest(); $request = $this->getRequest();
$autrePage = $request->getParam('apage'); $autrePage = $request->getParam('apage');
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
//Récupération des informations //Récupération des informations
if (empty($autrePage)) { if (empty($autrePage)) {
$this->view->headTitle()->prepend("Ratios"); $this->view->headTitle()->prepend("Ratios");
@ -1033,6 +1048,11 @@ class Legal_FinanceController extends Zend_Controller_Action
$this->view->headTitle()->prepend("Bourse & Cotations"); $this->view->headTitle()->prepend("Bourse & Cotations");
$this->view->headTitle()->prepend("Siret ".$this->siret); $this->view->headTitle()->prepend("Siret ".$this->siret);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
require_once 'Scores/Logo.php'; require_once 'Scores/Logo.php';
$siren = substr($this->siret, 0, 9); $siren = substr($this->siret, 0, 9);
@ -1078,6 +1098,11 @@ class Legal_FinanceController extends Zend_Controller_Action
$infos = $this->getRequest()->getParam('infos'); $infos = $this->getRequest()->getParam('infos');
} }
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$entreprise = new Scores_Session_Entreprise($this->siret, $this->id); $entreprise = new Scores_Session_Entreprise($this->siret, $this->id);
$this->view->assign('banques', $infos->result->item); $this->view->assign('banques', $infos->result->item);
$this->view->assign('raisonSociale', $entreprise->getRaisonSociale()); $this->view->assign('raisonSociale', $entreprise->getRaisonSociale());

View File

@ -71,6 +71,8 @@ class Legal_IdentiteController extends Zend_Controller_Action
{ {
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
$this->view->InputLinks = array(); $this->view->InputLinks = array();
//autorisation print
$this->view->Printable = true; $this->view->Printable = true;
$this->view-> PrintHtml = true; $this->view-> PrintHtml = true;
$this->view-> PrintPdf = true; $this->view-> PrintPdf = true;
@ -240,6 +242,11 @@ class Legal_IdentiteController extends Zend_Controller_Action
$this->forward('perms', 'error'); $this->forward('perms', 'error');
} }
//autorise l'impression
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$siren = substr($this->siret,0,9); $siren = substr($this->siret,0,9);
//Modification du titre //Modification du titre
if(empty($this->siret)){ if(empty($this->siret)){
@ -358,6 +365,11 @@ class Legal_IdentiteController extends Zend_Controller_Action
{ {
$request = $this->getRequest(); $request = $this->getRequest();
//autorise l'impression
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$siren = substr($this->siret,0,9); $siren = substr($this->siret,0,9);
$actif = $request->getParam('actif', -1); $actif = $request->getParam('actif', -1);
$this->view->headTitle()->prepend('Liste des établissements - Siren '.$siren); $this->view->headTitle()->prepend('Liste des établissements - Siren '.$siren);
@ -669,6 +681,11 @@ class Legal_IdentiteController extends Zend_Controller_Action
$autrePage = $this->getRequest()->getParam('apage'); $autrePage = $this->getRequest()->getParam('apage');
$lienRef = $request->getParam('lienref', null); $lienRef = $request->getParam('lienref', null);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$nbMonthForRecentLien = 3; $nbMonthForRecentLien = 3;
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
@ -1201,6 +1218,11 @@ class Legal_IdentiteController extends Zend_Controller_Action
$this->view->headTitle()->prepend('Evènements - Siren '.$siren); $this->view->headTitle()->prepend('Evènements - Siren '.$siren);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
//Pagination //Pagination
$page = $request->getParam('page', 1); $page = $request->getParam('page', 1);
if ( $page <= 0 ) $page = 1; if ( $page <= 0 ) $page = 1;
@ -1703,6 +1725,11 @@ class Legal_IdentiteController extends Zend_Controller_Action
$this->view->headTitle()->prepend("Groupe"); $this->view->headTitle()->prepend("Groupe");
$this->view->headTitle()->prepend("Siret ".$this->siret); $this->view->headTitle()->prepend("Siret ".$this->siret);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$siren = substr($this->siret,0,9); $siren = substr($this->siret,0,9);
$session = new Scores_Session_Entreprise($this->siret, $this->id); $session = new Scores_Session_Entreprise($this->siret, $this->id);

View File

@ -31,6 +31,12 @@ class Legal_JuridiqueController extends Zend_Controller_Action
$idAnn = $request->getParam('idAnn', null); $idAnn = $request->getParam('idAnn', null);
$siren = substr($this->siret, 0,9); $siren = substr($this->siret, 0,9);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$source = $request->getParam('source'); $source = $request->getParam('source');
if (!empty($source)) { if (!empty($source)) {
switch ($source){ switch ($source){
@ -381,6 +387,11 @@ class Legal_JuridiqueController extends Zend_Controller_Action
$this->view->headTitle()->prepend("Informations Réglementées"); $this->view->headTitle()->prepend("Informations Réglementées");
$this->view->headTitle()->prepend("Siret ".$this->siret); $this->view->headTitle()->prepend("Siret ".$this->siret);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$request = $this->getRequest(); $request = $this->getRequest();
$idAnn = $request->getParam('idann', false); $idAnn = $request->getParam('idann', false);
$siren = substr($this->siret, 0,9); $siren = substr($this->siret, 0,9);
@ -431,6 +442,11 @@ class Legal_JuridiqueController extends Zend_Controller_Action
$this->view->headTitle()->prepend("Compétences Territoriales"); $this->view->headTitle()->prepend("Compétences Territoriales");
$this->view->headTitle()->prepend("Siret ".$this->siret); $this->view->headTitle()->prepend("Siret ".$this->siret);
//autorisation print
$this->view->Printable = true;
$this->view-> PrintHtml = true;
$this->view-> PrintPdf = true;
$request = $this->getRequest(); $request = $this->getRequest();
$type = $request->getParam('type', ''); $type = $request->getParam('type', '');
$siren = substr($this->siret,0,9); $siren = substr($this->siret,0,9);

View File

@ -69,11 +69,8 @@ class Application_Controller_Plugin_Print extends Zend_Controller_Plugin_Abstrac
$page = new Scores_Export_Print($controller, $action); $page = new Scores_Export_Print($controller, $action);
$filename = $page->filename('pdf', $request->getParams()); $filename = $page->filename('pdf', $request->getParams());
$content = preg_replace('@<link href="/@si','<link href="./',$html);
//$content = preg_replace('@<link href="/@si','<link href="./',$html);
$content = preg_replace('@<link href="/@si','<link href="../../../../extranet/public/',$html);
$content = preg_replace('@src="/@si','src="./',$content); $content = preg_replace('@src="/@si','src="./',$content);
$c = Zend_Registry::get('config'); $c = Zend_Registry::get('config');
file_put_contents($c->profil->path->shared.'/temp/pages/'.$filename.'.html', $content); file_put_contents($c->profil->path->shared.'/temp/pages/'.$filename.'.html', $content);
} }

File diff suppressed because it is too large Load Diff