Affichage de tous les aperus

This commit is contained in:
Regis Houssin 2006-06-09 15:47:20 +00:00
parent df0586e2b1
commit 035073b964
2 changed files with 31 additions and 16 deletions

View File

@ -163,15 +163,15 @@ if ($_GET["propalid"] > 0)
* Documents
*/
$propalref = sanitize_string($propal->ref);
$file = $conf->propal->dir_output . "/" . $propalref . "/" . $propalref . ".pdf";
$filedetail = $conf->propal->dir_output . "/" . $propalref . "/" . $propalref . "-detail.pdf";
$dir_output = $conf->propal->dir_output . "/";
$filepath = $dir_output . $propalref . "/";
$file = $filepath . $propalref . ".pdf";
$filedetail = $filepath . $propalref . "-detail.pdf";
$relativepath = "${propalref}/${propalref}.pdf";
$relativepathdetail = "${propalref}/${propalref}-detail.pdf";
// Chemin vers png aperçus
$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
$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é
elseif (file_exists($fileimagebis))
{
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercupropal&file='.urlencode($relativepathimagebis).'"><p>';
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercupropal&file='.urlencode($relativepathimagebis2).'"></p>';
$multiple = $relativepathimage . ".";
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>';
}
}

View File

@ -130,18 +130,17 @@ if ($_GET["facid"] > 0)
* Documents
*/
$facref = sanitize_string($fac->ref);
$file = $conf->facture->dir_output . "/" . $facref . "/" . $facref . ".pdf";
$filedetail = $conf->facture->dir_output . "/" . $facref . "/" . $facref . "-detail.pdf";
$dir_output = $conf->facture->dir_output . "/";
$filepath = $dir_output . $facref . "/";
$file = $filepath . $facref . ".pdf";
$filedetail = $filepath . $facref . "-detail.pdf";
$relativepath = "${facref}/${facref}.pdf";
$relativepathdetail = "${facref}/${facref}-detail.pdf";
// Chemin vers png aperçus
$relativepathimage = "${facref}/${facref}.pdf.png";
$relativepathimagebis = "${facref}/${facref}.pdf.png.0";
$relativepathimagebis2 = "${facref}/${facref}.pdf.png.1";
$fileimage = $file.".png"; // Si PDF d'1 page
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
$relativepathimage = "${facref}/${facref}.pdf.png";
$fileimage = $file.".png"; // Si PDF d'1 page
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
$var=true;
@ -258,8 +257,16 @@ if (file_exists($fileimage))
// Si fichier png PDF de plus d'1 page trouvé
elseif (file_exists($fileimagebis))
{
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercufacture&file='.urlencode($relativepathimagebis).'"><p>';
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercufacture&file='.urlencode($relativepathimagebis2).'"></p>';
$multiple = $relativepathimage . ".";
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>';
}
}