diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 12821b8d0c8..25f931866aa 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * * 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_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_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_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); diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index d8259edcaea..61bb2506516 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -75,10 +75,10 @@ if ($id > 0 || ! empty($ref)) * Propal */ print ''; - + // Ref print ''; - + // Ref client print '
'.$langs->trans('Ref').''.$object->ref.'
'; print ''; print ''; - + $rowspan=2; - + // Tiers print ''; print ''; - + // Ligne info remises tiers print ''; - + // ligne // partie Gauche print ''; - + // partie Droite sur $rowspan lignes print '"; print ''; - + print ''; print ''; print ''; @@ -200,7 +201,7 @@ if (file_exists($fileimage)) // Si fichier png PDF de plus d'1 page trouve elseif (file_exists($fileimagebis)) { - $multiple = $relativepath . "-"; + $multiple = preg_replace('/\.png/','',$relativepath) . "-"; for ($i = 0; $i < 20; $i++) { diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 6d2c9f4452c..963f8101b43 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin * * 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 . "/"; $file = $filepath . $objectref . ".pdf"; $filedetail = $filepath . $objectref . "-detail.pdf"; - $relativepath = "${objectref}/${objectref}.pdf"; - $relativepathdetail = "${objectref}/${objectref}-detail.pdf"; + $relativepath = $objectref.'/'.$objectref.'.pdf'; + $relativepathdetail = $objectref.'/'.$objectref.'-detail.pdf'; // Chemin vers png apercus $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; @@ -209,12 +210,12 @@ if (file_exists($fileimage)) // Si fichier png PDF de plus d'1 page trouve elseif (file_exists($fileimagebis)) { - $multiple = $relativepath . "-"; - + $multiple = preg_replace('/\.png/','',$relativepath) . "-"; + for ($i = 0; $i < 20; $i++) { $preview = $multiple.$i.'.png'; - + if (file_exists($dir_output.$preview)) { print '

'; diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index a24da1fd7ca..5e5edc23b0f 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -38,7 +38,7 @@ $langs->load("bills"); // Security check $socid=0; -$id = GETPOST("id"); +$id = GETPOST("facid"); $ref = GETPOST("ref"); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'facture', $id); @@ -63,12 +63,12 @@ $html = new Form($db); if ($id > 0 || ! empty($ref)) { $object = New Facture($db); - + if ($object->fetch($id,$ref) > 0) { $soc = new Societe($db, $object->socid); $soc->fetch($object->socid); - + $author = new User($db); if ($object->user_author) { @@ -124,12 +124,13 @@ if ($id > 0 || ! empty($ref)) $filepath = $dir_output . $objectref . "/"; $file = $filepath . $objectref . ".pdf"; $filedetail = $filepath . $objectref . "-detail.pdf"; - $relativepath = "${objectref}/${objectref}.pdf"; - $relativepathdetail = "${objectref}/${objectref}-detail.pdf"; + $relativepath = $objectref.'/'.$objectref.'.pdf'; + $relativepathdetail = $objectref.'/'.$objectref.'-detail.pdf'; // Chemin vers png apercus $fileimage = $file.".png"; // Si PDF d'1 page $fileimagebis = $file."-0.png"; // Si PDF de plus d'1 page + $relativepathimage = $relativepath.'.png'; $var=true; @@ -210,6 +211,7 @@ if ($id > 0 || ! empty($ref)) print '

'; @@ -89,13 +89,13 @@ if ($id > 0 || ! empty($ref)) print $object->ref_client; print '
'.$langs->trans('Company').''.$soc->getNomUrl(1).'
'.$langs->trans('Discounts').''; if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); @@ -106,16 +106,16 @@ if ($id > 0 || ! empty($ref)) else print $langs->trans("CompanyHasNoAbsoluteDiscount"); print '.'; print '
'.$langs->trans('Date').''; print dol_print_date($object->date,'daytext'); print ''; - + /* * Documents */ @@ -124,43 +124,44 @@ if ($id > 0 || ! empty($ref)) $filepath = $dir_output . $objectref . "/"; $file = $filepath . $objectref . ".pdf"; $filedetail = $filepath . $objectref . "-detail.pdf"; - $relativepath = "${objectref}/${objectref}.pdf"; - $relativepathdetail = "${objectref}/${objectref}-detail.pdf"; - + $relativepath = $objectref.'/'.$objectref.'.pdf'; + $relativepathdetail = $objectref.'/'.$objectref.'-detail.pdf'; + // Chemin vers png apercus $fileimage = $file.".png"; // Si PDF d'1 page $fileimagebis = $file."-0.png"; // Si PDF de plus d'1 page - + $relativepathimage = $relativepath.'.png'; + $var=true; - + // Si fichier PDF existe if (file_exists($file)) { $encfile = urlencode($file); print_titre($langs->trans("Documents")); print ''; - + print ""; - + print ''; - + print ''; print ''; print ''; - + // Si fichier detail PDF existe // TODO obsolete ? if (file_exists($filedetail)) { print ""; - + print ''; print ''; print ''; print ''; } print "
".$langs->trans("Propal")." PDF'.$object->ref.'.pdf'.dol_print_size(dol_filesize($file)).''.dol_print_date(dol_filemtime($file),'dayhour').'
Propal detaillee'.$object->ref.'-detail.pdf'.dol_print_size(dol_filesize($filedetail)).''.dol_print_date(dol_filemtime($filedetail),'dayhour').'
\n"; - + // Conversion du PDF en image png si fichier png non existant if (! file_exists($fileimage) && ! file_exists($fileimagebis)) { @@ -168,7 +169,7 @@ if ($id > 0 || ! empty($ref)) { $ret = dol_convert_file($file); if ($ret < 0) $error++; - } + } else { $langs->load("other"); @@ -176,10 +177,10 @@ if ($id > 0 || ! empty($ref)) } } } - + print "
'.$langs->trans('AmountHT').''.price($object->price).''.$langs->trans("Currency".$conf->monnaie).'
'; + dol_fiche_end(); } else { @@ -226,12 +228,12 @@ if (file_exists($fileimage)) // Si fichier png PDF de plus d'1 page trouve elseif (file_exists($fileimagebis)) { - $multiple = $relativepath . "-"; - + $multiple = preg_replace('/\.png/','',$relativepath) . "-"; + for ($i = 0; $i < 20; $i++) { $preview = $multiple.$i.'.png'; - + if (file_exists($dir_output.$preview)) { print '

'; @@ -239,7 +241,6 @@ elseif (file_exists($fileimagebis)) } } -print ''; $db->close();