diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php index f9d8ab7f1cc..ac857c23f67 100644 --- a/htdocs/public/paybox/newpayment.php +++ b/htdocs/public/paybox/newpayment.php @@ -66,6 +66,7 @@ if (! is_numeric($amount) && empty($_REQUEST["ref"])) dol_print_error('','ErrorBadParameters'); exit; } +$suffix=$_REQUEST["suffix"]; @@ -105,30 +106,39 @@ llxHeaderPayBox($langs->trans("PaymentForm")); // Common variables $creditor=$mysoc->nom; -if (! empty($conf->global->PAYBOX_CREDITOR)) $creditor=$conf->global->PAYBOX_CREDITOR; - +$paramcreditor='PAYBOX_CREDITOR_'.$suffix; +if (! empty($conf->global->$paramcreditor)) $creditor=$conf->global->$paramcreditor; +else if (! empty($conf->global->PAYBOX_CREDITOR)) $creditor=$conf->global->PAYBOX_CREDITOR; print '
'; print '
'; print ''; print ''; print ''; +print ''; print "\n"; print ''."\n"; -// Show logo (search in order: small company logo, large company logo, theme logo, common logo) +// Show logo (search order: logo defined by PAYBOX_LOGO_suffix, then PAYBOX_LOGO, then small company logo, large company logo, theme logo, common logo) $width=0; +// Define logo and logosmall +$logosmall=$mysoc->logo_small; $logo=$mysoc->logo; +$paramlogo='PAYBOX_LOGO_'.$suffix; +if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo; +else if (! empty($conf->global->PAYBOX_LOGO)) $logosmall=$conf->global->PAYBOX_LOGO; +// Define urllogo $urllogo=''; -if (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_logos.'/thumbs/'.$mysoc->logo_small)) +if (! empty($logosmall) && is_readable($conf->societe->dir_logos.'/thumbs/'.$logosmall)) { - $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$mysoc->logo_small); + $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode('thumbs/'.$logosmall); } -elseif (! empty($mysoc->logo_small) && is_readable($conf->societe->dir_logos.'/'.$mysoc->logo)) +elseif (! empty($logo) && is_readable($conf->societe->dir_logos.'/'.$logo)) { - $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode($mysoc->logo); + $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=companylogo&file='.urlencode($logo); $width=96; } +// Output html code for logo if ($urllogo) { print ''; @@ -583,7 +593,7 @@ if ($mesg) print ''; + print ''; //print ''; }

'. if ($found) { - print '


'.$langs->trans("YouWillBeRedirectedOnPayBox").'...