Fix: Some fix in preview feature.
This commit is contained in:
parent
7514a6c758
commit
106a956889
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -64,7 +64,7 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update')
|
|||||||
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
|
||||||
//dolibarr_set_const($db, "MAIN_CONFIRM_AJAX", $_POST["MAIN_CONFIRM_AJAX"],'chaine',0,'',$conf->entity);
|
//dolibarr_set_const($db, "MAIN_CONFIRM_AJAX", $_POST["MAIN_CONFIRM_AJAX"],'chaine',0,'',$conf->entity);
|
||||||
//dolibarr_set_const($db, "MAIN_POPUP_CALENDAR", $_POST["MAIN_POPUP_CALENDAR"],'chaine',0,'',$conf->entity);
|
//dolibarr_set_const($db, "MAIN_POPUP_CALENDAR", $_POST["MAIN_POPUP_CALENDAR"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["main_use_preview_tabs"],'chaine',0,'',$conf->entity);
|
//dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["main_use_preview_tabs"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity);
|
||||||
|
|||||||
@ -124,12 +124,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$filepath = $dir_output . $objectref . "/";
|
$filepath = $dir_output . $objectref . "/";
|
||||||
$file = $filepath . $objectref . ".pdf";
|
$file = $filepath . $objectref . ".pdf";
|
||||||
$filedetail = $filepath . $objectref . "-detail.pdf";
|
$filedetail = $filepath . $objectref . "-detail.pdf";
|
||||||
$relativepath = "${objectref}/${objectref}.pdf";
|
$relativepath = $objectref.'/'.$objectref.'.pdf';
|
||||||
$relativepathdetail = "${objectref}/${objectref}-detail.pdf";
|
$relativepathdetail = $objectref.'/'.$objectref.'-detail.pdf';
|
||||||
|
|
||||||
// Chemin vers png apercus
|
// Chemin vers png apercus
|
||||||
$fileimage = $file.".png"; // Si PDF d'1 page
|
$fileimage = $file.".png"; // Si PDF d'1 page
|
||||||
$fileimagebis = $file."-0.png"; // Si PDF de plus d'1 page
|
$fileimagebis = $file."-0.png"; // Si PDF de plus d'1 page
|
||||||
|
$relativepathimage = $relativepath.'.png';
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
@ -200,7 +201,7 @@ if (file_exists($fileimage))
|
|||||||
// Si fichier png PDF de plus d'1 page trouve
|
// Si fichier png PDF de plus d'1 page trouve
|
||||||
elseif (file_exists($fileimagebis))
|
elseif (file_exists($fileimagebis))
|
||||||
{
|
{
|
||||||
$multiple = $relativepath . "-";
|
$multiple = preg_replace('/\.png/','',$relativepath) . "-";
|
||||||
|
|
||||||
for ($i = 0; $i < 20; $i++)
|
for ($i = 0; $i < 20; $i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -110,12 +110,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$filepath = $dir_output . $objectref . "/";
|
$filepath = $dir_output . $objectref . "/";
|
||||||
$file = $filepath . $objectref . ".pdf";
|
$file = $filepath . $objectref . ".pdf";
|
||||||
$filedetail = $filepath . $objectref . "-detail.pdf";
|
$filedetail = $filepath . $objectref . "-detail.pdf";
|
||||||
$relativepath = "${objectref}/${objectref}.pdf";
|
$relativepath = $objectref.'/'.$objectref.'.pdf';
|
||||||
$relativepathdetail = "${objectref}/${objectref}-detail.pdf";
|
$relativepathdetail = $objectref.'/'.$objectref.'-detail.pdf';
|
||||||
|
|
||||||
// Chemin vers png apercus
|
// Chemin vers png apercus
|
||||||
$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."-0.png"; // Si PDF de plus d'1 page
|
||||||
|
$relativepathimage = $relativepath.'.png';
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
@ -209,7 +210,7 @@ if (file_exists($fileimage))
|
|||||||
// Si fichier png PDF de plus d'1 page trouve
|
// Si fichier png PDF de plus d'1 page trouve
|
||||||
elseif (file_exists($fileimagebis))
|
elseif (file_exists($fileimagebis))
|
||||||
{
|
{
|
||||||
$multiple = $relativepath . "-";
|
$multiple = preg_replace('/\.png/','',$relativepath) . "-";
|
||||||
|
|
||||||
for ($i = 0; $i < 20; $i++)
|
for ($i = 0; $i < 20; $i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -38,7 +38,7 @@ $langs->load("bills");
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
$id = GETPOST("id");
|
$id = GETPOST("facid");
|
||||||
$ref = GETPOST("ref");
|
$ref = GETPOST("ref");
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'facture', $id);
|
$result = restrictedArea($user, 'facture', $id);
|
||||||
@ -124,12 +124,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$filepath = $dir_output . $objectref . "/";
|
$filepath = $dir_output . $objectref . "/";
|
||||||
$file = $filepath . $objectref . ".pdf";
|
$file = $filepath . $objectref . ".pdf";
|
||||||
$filedetail = $filepath . $objectref . "-detail.pdf";
|
$filedetail = $filepath . $objectref . "-detail.pdf";
|
||||||
$relativepath = "${objectref}/${objectref}.pdf";
|
$relativepath = $objectref.'/'.$objectref.'.pdf';
|
||||||
$relativepathdetail = "${objectref}/${objectref}-detail.pdf";
|
$relativepathdetail = $objectref.'/'.$objectref.'-detail.pdf';
|
||||||
|
|
||||||
// Chemin vers png apercus
|
// Chemin vers png apercus
|
||||||
$fileimage = $file.".png"; // Si PDF d'1 page
|
$fileimage = $file.".png"; // Si PDF d'1 page
|
||||||
$fileimagebis = $file."-0.png"; // Si PDF de plus d'1 page
|
$fileimagebis = $file."-0.png"; // Si PDF de plus d'1 page
|
||||||
|
$relativepathimage = $relativepath.'.png';
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
@ -210,6 +211,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -226,7 +228,7 @@ if (file_exists($fileimage))
|
|||||||
// Si fichier png PDF de plus d'1 page trouve
|
// Si fichier png PDF de plus d'1 page trouve
|
||||||
elseif (file_exists($fileimagebis))
|
elseif (file_exists($fileimagebis))
|
||||||
{
|
{
|
||||||
$multiple = $relativepath . "-";
|
$multiple = preg_replace('/\.png/','',$relativepath) . "-";
|
||||||
|
|
||||||
for ($i = 0; $i < 20; $i++)
|
for ($i = 0; $i < 20; $i++)
|
||||||
{
|
{
|
||||||
@ -239,7 +241,6 @@ elseif (file_exists($fileimagebis))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user