Affichage de tous les aperçus
This commit is contained in:
parent
df0586e2b1
commit
035073b964
@ -163,15 +163,15 @@ if ($_GET["propalid"] > 0)
|
|||||||
* Documents
|
* Documents
|
||||||
*/
|
*/
|
||||||
$propalref = sanitize_string($propal->ref);
|
$propalref = sanitize_string($propal->ref);
|
||||||
$file = $conf->propal->dir_output . "/" . $propalref . "/" . $propalref . ".pdf";
|
$dir_output = $conf->propal->dir_output . "/";
|
||||||
$filedetail = $conf->propal->dir_output . "/" . $propalref . "/" . $propalref . "-detail.pdf";
|
$filepath = $dir_output . $propalref . "/";
|
||||||
|
$file = $filepath . $propalref . ".pdf";
|
||||||
|
$filedetail = $filepath . $propalref . "-detail.pdf";
|
||||||
$relativepath = "${propalref}/${propalref}.pdf";
|
$relativepath = "${propalref}/${propalref}.pdf";
|
||||||
$relativepathdetail = "${propalref}/${propalref}-detail.pdf";
|
$relativepathdetail = "${propalref}/${propalref}-detail.pdf";
|
||||||
|
|
||||||
// Chemin vers png aperçus
|
// Chemin vers png aperçus
|
||||||
$relativepathimage = "${propalref}/${propalref}.pdf.png";
|
$relativepathimage = "${propalref}/${propalref}.pdf.png";
|
||||||
$relativepathimagebis = "${propalref}/${propalref}.pdf.png.0";
|
|
||||||
$relativepathimagebis2 = "${propalref}/${propalref}.pdf.png.1";
|
|
||||||
$fileimage = $file.".png"; // Si PDF d'1 page
|
$fileimage = $file.".png"; // Si PDF d'1 page
|
||||||
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
|
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
|
||||||
|
|
||||||
@ -262,8 +262,16 @@ if (file_exists($fileimage))
|
|||||||
// Si fichier png PDF de plus d'1 page trouvé
|
// Si fichier png PDF de plus d'1 page trouvé
|
||||||
elseif (file_exists($fileimagebis))
|
elseif (file_exists($fileimagebis))
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercupropal&file='.urlencode($relativepathimagebis).'"><p>';
|
$multiple = $relativepathimage . ".";
|
||||||
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercupropal&file='.urlencode($relativepathimagebis2).'"></p>';
|
|
||||||
|
for ($i = 0; $i < 20; $i++)
|
||||||
|
{
|
||||||
|
$preview = $multiple.$i;
|
||||||
|
|
||||||
|
if (file_exists($dir_output.$preview))
|
||||||
|
{
|
||||||
|
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercupropal&file='.urlencode($preview).'"><p>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -130,18 +130,17 @@ if ($_GET["facid"] > 0)
|
|||||||
* Documents
|
* Documents
|
||||||
*/
|
*/
|
||||||
$facref = sanitize_string($fac->ref);
|
$facref = sanitize_string($fac->ref);
|
||||||
$file = $conf->facture->dir_output . "/" . $facref . "/" . $facref . ".pdf";
|
$dir_output = $conf->facture->dir_output . "/";
|
||||||
$filedetail = $conf->facture->dir_output . "/" . $facref . "/" . $facref . "-detail.pdf";
|
$filepath = $dir_output . $facref . "/";
|
||||||
|
$file = $filepath . $facref . ".pdf";
|
||||||
|
$filedetail = $filepath . $facref . "-detail.pdf";
|
||||||
$relativepath = "${facref}/${facref}.pdf";
|
$relativepath = "${facref}/${facref}.pdf";
|
||||||
$relativepathdetail = "${facref}/${facref}-detail.pdf";
|
$relativepathdetail = "${facref}/${facref}-detail.pdf";
|
||||||
|
|
||||||
// Chemin vers png aperçus
|
// Chemin vers png aperçus
|
||||||
$relativepathimage = "${facref}/${facref}.pdf.png";
|
$relativepathimage = "${facref}/${facref}.pdf.png";
|
||||||
$relativepathimagebis = "${facref}/${facref}.pdf.png.0";
|
$fileimage = $file.".png"; // Si PDF d'1 page
|
||||||
$relativepathimagebis2 = "${facref}/${facref}.pdf.png.1";
|
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
|
||||||
|
|
||||||
$fileimage = $file.".png"; // Si PDF d'1 page
|
|
||||||
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
|
|
||||||
|
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
@ -258,8 +257,16 @@ if (file_exists($fileimage))
|
|||||||
// Si fichier png PDF de plus d'1 page trouvé
|
// Si fichier png PDF de plus d'1 page trouvé
|
||||||
elseif (file_exists($fileimagebis))
|
elseif (file_exists($fileimagebis))
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercufacture&file='.urlencode($relativepathimagebis).'"><p>';
|
$multiple = $relativepathimage . ".";
|
||||||
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercufacture&file='.urlencode($relativepathimagebis2).'"></p>';
|
|
||||||
|
for ($i = 0; $i < 20; $i++)
|
||||||
|
{
|
||||||
|
$preview = $multiple.$i;
|
||||||
|
|
||||||
|
if (file_exists($dir_output.$preview))
|
||||||
|
{
|
||||||
|
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercufacture&file='.urlencode($preview).'"><p>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user