Fichier des PDFs dans les commentaires
This commit is contained in:
parent
99e3eb700c
commit
f75d0ba5d5
@ -284,29 +284,4 @@ class FichierController extends Zend_Controller_Action
|
|||||||
echo "Impossible de charger le fichier.";
|
echo "Impossible de charger le fichier.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gestion des fichiers Actes et Bilans
|
|
||||||
*/
|
|
||||||
public function commentairesAction()
|
|
||||||
{
|
|
||||||
$directory = APPLICATION_PATH.'/../cache/commentaires';
|
|
||||||
$file = $this->getRequest()->getParam('fichier');
|
|
||||||
$output_file = $directory.'/'.$file;
|
|
||||||
if (file_exists($output_file) && filesize($output_file)>0) {
|
|
||||||
$content_type = 'application/pdf';
|
|
||||||
header('Content-type: '.$content_type.'');
|
|
||||||
header('Content-Length: '.filesize($output_file));
|
|
||||||
header('Content-MD5: '.base64_encode(md5_file($output_file)));
|
|
||||||
header('Content-Disposition: inline; filename="'.basename($output_file).'"');
|
|
||||||
header('Cache-Control: private, max-age=0, must-revalidate');
|
|
||||||
header('Pragma: public');
|
|
||||||
ini_set('zlib.output_compression','0');
|
|
||||||
echo file_get_contents($output_file);
|
|
||||||
} else {
|
|
||||||
echo "Erreur lors de l'affichage du fichier.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -214,8 +214,8 @@ class RapportComment
|
|||||||
protected function lien($content)
|
protected function lien($content)
|
||||||
{
|
{
|
||||||
$path = array(
|
$path = array(
|
||||||
'pdf' => '/fichier/commentaires',
|
'pdf' => '/commentaires',
|
||||||
'html' => '',
|
'html' => '/commentaires',
|
||||||
);
|
);
|
||||||
$pattern = "/<lien='(.*?).(pdf|html|htm)'>(.*?)<\/lien>/i";
|
$pattern = "/<lien='(.*?).(pdf|html|htm)'>(.*?)<\/lien>/i";
|
||||||
preg_match($pattern, $content, $matches);
|
preg_match($pattern, $content, $matches);
|
||||||
@ -233,7 +233,7 @@ class RapportComment
|
|||||||
case 'html':
|
case 'html':
|
||||||
$content = str_replace(
|
$content = str_replace(
|
||||||
$matches[0],
|
$matches[0],
|
||||||
"<a href='".$path['html'].$matches[1].".".
|
"<a href='".$path['html']."/".$matches[1].".".
|
||||||
$matches[2]."' target='_blank'>".
|
$matches[2]."' target='_blank'>".
|
||||||
$matches[3]."</a>",
|
$matches[3]."</a>",
|
||||||
$content);
|
$content);
|
||||||
|
@ -5,22 +5,10 @@
|
|||||||
<script language="javascript" type="text/javascript">AC_FL_RunContent = 0;</script>
|
<script language="javascript" type="text/javascript">AC_FL_RunContent = 0;</script>
|
||||||
<script src="http://www.comptalia.tv/swf/AC_RunActiveContent.js" language="javascript" type="text/javascript"></script>
|
<script src="http://www.comptalia.tv/swf/AC_RunActiveContent.js" language="javascript" type="text/javascript"></script>
|
||||||
|
|
||||||
<!-- GOOGLE ANALYTICS -->
|
|
||||||
<script type="text/javascript">
|
|
||||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
|
||||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript" >
|
|
||||||
var pageTracker = _gat._getTracker("UA-520632-1");
|
|
||||||
pageTracker._initData();
|
|
||||||
pageTracker._trackPageview();
|
|
||||||
</script>
|
|
||||||
<!-- GOOGLE ANALYTICS -->
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="#cccccc" topmargin="0">
|
<body bgcolor="#cccccc" topmargin="0">
|
||||||
<!--URL utilisées dans l'animation-->
|
<!--URL utilis<69>es dans l'animation-->
|
||||||
<!--texte utilisé dans l'animation-->
|
<!--texte utilis<69> dans l'animation-->
|
||||||
<!--
|
<!--
|
||||||
_root.nomLot
|
_root.nomLot
|
||||||
Lancer la roue
|
Lancer la roue
|
||||||
@ -32,7 +20,7 @@ Lancer la roue
|
|||||||
<td>
|
<td>
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
if (AC_FL_RunContent == 0) {
|
if (AC_FL_RunContent == 0) {
|
||||||
alert("Cette page nécessite le fichier AC_RunActiveContent.js.");
|
alert("Cette page nécessite le fichier AC_RunActiveContent.js.");
|
||||||
} else {
|
} else {
|
||||||
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','name','roue-relance','width','780','height','800','align','middle','id','roue-relance','src','roue-relance','quality','high','bgcolor','#999999','allowscriptaccess','sameDomain','allowfullscreen','false','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','roue-relance' ); //end AC code
|
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','name','roue-relance','width','780','height','800','align','middle','id','roue-relance','src','roue-relance','quality','high','bgcolor','#999999','allowscriptaccess','sameDomain','allowfullscreen','false','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','roue-relance' ); //end AC code
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user