From 984e302813d013f8b36522644d067d66f3d56e94 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 2 May 2023 16:05:28 +0200 Subject: [PATCH 1/5] FIX avoid warnings php8 --- htdocs/compta/cashcontrol/cashcontrol_card.php | 4 ++-- htdocs/compta/facture/list.php | 3 ++- htdocs/takepos/freezone.php | 2 +- htdocs/takepos/index.php | 2 +- htdocs/takepos/split.php | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index dfc8564b34c..5f481da2ba5 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -295,7 +295,7 @@ if ($action == "create" || $action == "start" || $action == 'close') { } } - if ($terminalid != '') { + if (isset($terminalid) && $terminalid != '') { // Calculate $initialbalanceforterminal for terminal 0 foreach ($arrayofpaymentmode as $key => $val) { if ($key != 'cash') { @@ -305,7 +305,7 @@ if ($action == "create" || $action == "start" || $action == 'close') { // Get the bank account dedicated to this point of sale module/terminal $vartouse = 'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse; - $bankid = $conf->global->$vartouse; + $bankid = getDolGlobalInt($vartouse); if ($bankid > 0) { $sql = "SELECT SUM(amount) as total FROM ".MAIN_DB_PREFIX."bank"; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 3de67f73acf..335330cd8e2 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1185,6 +1185,7 @@ if ($resql) { $massactionbutton = $form->selectMassAction('', $arrayofmassactions); // Show the new button only when this page is not opend from the Extended POS + $newcardbutton = ''; if ($contextpage != 'poslist') { $url = DOL_URL_ROOT.'/compta/facture/card.php?action=create'; if (!empty($socid)) { @@ -2548,7 +2549,7 @@ if ($resql) { } // Use correct digits number for totals - $totalarray['val']['total_margin'] = price2num($totalarray['val']['total_margin'], 'MT'); + $totalarray['val']['total_margin'] = (isset($totalarray['val']['total_margin']) ? price2num($totalarray['val']['total_margin'], 'MT') : null); // Show total line include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; diff --git a/htdocs/takepos/freezone.php b/htdocs/takepos/freezone.php index e1b24ec286d..6d540f30aa8 100644 --- a/htdocs/takepos/freezone.php +++ b/htdocs/takepos/freezone.php @@ -84,7 +84,7 @@ $vatRateDefault = get_default_tva($mysoc, $soc); $arrayofcss = array('/takepos/css/pos.css.php'); $arrayofjs = array(); -top_htmlhead($head, '', 0, 0, $arrayofjs, $arrayofcss); +top_htmlhead('', '', 0, 0, $arrayofjs, $arrayofcss); ?> diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index dc2bd8b684a..4ae532010e5 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -936,7 +936,7 @@ $( document ).ready(function() { if ($resql) { $obj = $db->fetch_object($resql); // If there is no cash control from today open it - if ($obj->rowid == null) { + if (!isset($obj->rowid) || is_null($obj->rowid)) { print "ControlCashOpening();"; } } diff --git a/htdocs/takepos/split.php b/htdocs/takepos/split.php index 0391e911ba5..239b23f389d 100644 --- a/htdocs/takepos/split.php +++ b/htdocs/takepos/split.php @@ -125,7 +125,7 @@ if ($action=="split") { */ $invoice = new Facture($db); -if ($invoiceid > 0) { +if (isset($invoiceid) && $invoiceid > 0) { $invoice->fetch($invoiceid); } else { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'"; @@ -134,7 +134,7 @@ if ($invoiceid > 0) { if ($obj) { $invoiceid = $obj->rowid; } - if (!$invoiceid) { + if (!isset($invoiceid)) { $invoiceid = 0; // Invoice does not exist yet } else { $invoice->fetch($invoiceid); From 77e52007e490ddede00e9d2ea53b8dc60955c473 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Fri, 5 May 2023 19:09:28 +0200 Subject: [PATCH 2/5] fix: add field in sql the is use in line 1463 and remove undeclare varible --- htdocs/comm/card.php | 1 + htdocs/comm/propal/card.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index b64673f0670..f20a70f87dd 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -1419,6 +1419,7 @@ if ($object->id > 0) { $sql .= ', f.total_tva'; $sql .= ', f.total_ttc'; $sql .= ', f.entity'; + $sql .= ', f.date_lim_reglement as dl'; $sql .= ', f.datef as df, f.datec as dc, f.paye as paye, f.fk_statut as status'; $sql .= ', s.nom, s.rowid as socid'; $sql .= ', SUM(pf.amount) as am'; diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index facb021d7e6..d76c28ed813 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2251,9 +2251,9 @@ if ($action == 'create') { } if (empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)) { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), $text, 'confirm_closeas', $formquestion, '', 1, 250); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250); } else { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?statut=3&id=' . $object->id, $langs->trans('Close'), $text, 'confirm_closeas', $formquestion, '', 1, 250); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?statut=3&id=' . $object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250); } } elseif ($action == 'delete') { // Confirm delete From 3880871be73f6bffbf6b2191471b0727d86ebdea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 May 2023 04:12:08 +0200 Subject: [PATCH 3/5] Debug v17 --- htdocs/public/project/index.php | 161 ++++++++++++++++++-------------- 1 file changed, 89 insertions(+), 72 deletions(-) diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php index 3488fe8e4c4..946c6de30fc 100644 --- a/htdocs/public/project/index.php +++ b/htdocs/public/project/index.php @@ -50,10 +50,8 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -// Hook to be used by external payment modules (ie Payzen, ...) -include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; -$hookmanager = new HookManager($db); -$hookmanager->initHooks(array('newpayment')); + +global $dolibarr_main_url_root; // Load translation files $langs->loadLangs(array("other", "dict", "bills", "companies", "errors", "paybox", "paypal", "stripe")); // File with generic data @@ -83,12 +81,90 @@ if ($resultproject < 0) { $errmsg .= $project->error; } +$hookmanager->initHooks(array('newpayment')); + +$extrafields = new ExtraFields($db); + +$user->loadDefaultValues(); + // Security check if (empty($conf->project->enabled)) { httponly_accessforbidden('Module Project not enabled'); } + +/** + * Show header for new member + * + * @param string $title Title + * @param string $head Head array + * @param int $disablejs More content into html header + * @param int $disablehead More content into html header + * @param array $arrayofjs Array of complementary js files + * @param array $arrayofcss Array of complementary css files + * @return void + */ +function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') +{ + global $user, $conf, $langs, $mysoc; + + top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers + + print ''; + + // Define urllogo + $urllogo = DOL_URL_ROOT.'/theme/common/login_logo.png'; + + if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); + } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); + } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; + } + + print '
'; + // Output html code for logo + if ($urllogo) { + print '
'; + print '
'; + print ''; + print '
'; + if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + print ''; + } + print '
'; + } + + if (!empty($conf->global->PROJECT_IMAGE_PUBLIC_SUGGEST_CONFERENCE)) { + print '
'; + print ''; + print '
'; + } + + print '
'; + + print '
'; +} + +/** + * Show footer for new member + * + * @return void + */ +function llxFooterVierge() +{ + print '
'; + + printCommonFooter('public'); + + print "\n"; + print "\n"; +} + + /* * Actions */ @@ -185,25 +261,24 @@ if (!empty($conf->global->PROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT)) { print ''; } -print '
'; print '
'; print '
'; -// Event summary -print '
'; -print ''.dol_escape_htmltag($project->title . ' '. $project->label).'
'; -print '

'."\n"; -print ''.$langs->trans("EvntOrgRegistrationWelcomeMessage")."\n"; -print $project->note_public."\n"; -//print img_picto('', 'map-marker-alt').$langs->trans("Location").': xxxx'; +// Sub banner +print '
'; +print load_fiche_titre($langs->trans("NewRegistration"), '', '', 0, 0, 'center'); +// Welcome message +print ''.$langs->trans("EvntOrgRegistrationWelcomeMessage").''; +print '
'; +// Title +print ''.dol_escape_htmltag($project->title . ' '. $conference->label).'
'; print '
'; - // Help text -print '
'; +print '
'; if ($project->date_start_event || $project->date_end_event) { print '
'; @@ -297,61 +372,3 @@ htmlPrintOnlinePaymentFooter($mysoc, $langs, 1, $suffix, $object); llxFooter('', 'public'); $db->close(); - - - -/** - * Show header for new member - * - * @param string $title Title - * @param string $head Head array - * @param int $disablejs More content into html header - * @param int $disablehead More content into html header - * @param array $arrayofjs Array of complementary js files - * @param array $arrayofcss Array of complementary css files - * @return void - */ -function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') -{ - global $user, $conf, $langs, $mysoc; - - top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers - - print ''; - - // Define urllogo - $urllogo = DOL_URL_ROOT.'/theme/common/login_logo.png'; - - if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { - $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); - } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { - $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); - } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { - $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; - } - - print '
'; - - // Output html code for logo - if ($urllogo) { - print '
'; - print '
'; - print ''; - print '
'; - if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print ''; - } - print '
'; - } - - if (!empty($conf->global->PROJECT_IMAGE_PUBLIC_SUGGEST_CONFERENCE)) { - print '
'; - print ''; - print '
'; - } - - print '
'; - - print '
'; -} From c09b6783a717447c593f886e690852ea61cc318e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 May 2023 04:49:02 +0200 Subject: [PATCH 4/5] Debug v17 --- .../public/eventorganization/attendee_new.php | 5 +- htdocs/public/project/suggestbooth.php | 72 ++++++++++--------- htdocs/public/project/suggestconference.php | 47 +++++++----- 3 files changed, 73 insertions(+), 51 deletions(-) diff --git a/htdocs/public/eventorganization/attendee_new.php b/htdocs/public/eventorganization/attendee_new.php index d0a3bb81d74..72e486a67f4 100644 --- a/htdocs/public/eventorganization/attendee_new.php +++ b/htdocs/public/eventorganization/attendee_new.php @@ -34,6 +34,9 @@ if (!defined('NOIPCHECK')) { if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', '1'); } +if (!defined('NOIPCHECK')) { + define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} // For MultiCompany module. @@ -626,7 +629,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen // Get email content from template $arraydefaultmessage = null; - $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT; + $labeltouse = getDolGlobalString('EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT'); if (!empty($labeltouse)) { $arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, ''); } diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index 772822374d4..d59cba09779 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -84,7 +84,7 @@ if ($resultproject < 0) { } // Security check -$securekeyreceived = GETPOST("securekey"); +$securekeyreceived = GETPOST('securekey', 'alpha'); $securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 'md5'); if ($securekeytocompare != $securekeyreceived) { @@ -203,10 +203,22 @@ if (empty($reshook) && $action == 'add') { $db->begin(); + if (!GETPOST("lastname")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Name"))."
\n"; + } if (!GETPOST("email")) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n"; } + if (!GETPOST("country_id") && !empty(floatval($project->price_booth))) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Country"))."
\n"; + } + if (!GETPOST("societe")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Societe"))."
\n"; + } if (!GETPOST("label")) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label"))."
\n"; @@ -215,44 +227,37 @@ if (empty($reshook) && $action == 'add') { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Note"))."
\n"; } - if (!GETPOST("email")) { - $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n"; - } - if (!GETPOST("lastname")) { - $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Name"))."
\n"; - } - if (!GETPOST("societe")) { - $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Societe"))."
\n"; - } if (GETPOST("email") && !isValidEmail(GETPOST("email"))) { $error++; $langs->load("errors"); $errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."
\n"; } - if (!GETPOST("country_id") && !empty(floatval($project->price_booth))) { - $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Country"))."
\n"; - } if (!$error) { // Getting the thirdparty or creating it $thirdparty = new Societe($db); $resultfetchthirdparty = $thirdparty->fetch('', $societe); - if ($resultfetchthirdparty<=0) { - // Need to create a new one (not found or multiple with the same name) - $thirdparty->name = $societe; + if ($resultfetchthirdparty < 0) { + // If an error was found + $error++; + $errmsg .= $thirdparty->error; + $errors = array_merge($errors, $thirdparty->errors); + } elseif ($resultfetchthirdparty == 0) { // No thirdparty found + a payment is expected + // Creation of a new thirdparty + if (!empty($societe)) { + $thirdparty->name = $societe; + } else { + $thirdparty->name = $genericcompanyname; + } $thirdparty->address = GETPOST("address"); $thirdparty->zip = GETPOST("zipcode"); $thirdparty->town = GETPOST("town"); - $thirdparty->client = 2; + $thirdparty->client = $thirdparty::PROSPECT; $thirdparty->fournisseur = 0; $thirdparty->country_id = GETPOST("country_id", 'int'); $thirdparty->state_id = GETPOST("state_id", 'int'); - $thirdparty->email = $email; + $thirdparty->email = ($emailcompany ? $emailcompany : $email); // Load object modCodeTiers $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard'); @@ -276,6 +281,7 @@ if (empty($reshook) && $action == 'add') { if ($readythirdparty <0) { $error++; $errmsg .= $thirdparty->error; + $errors = array_merge($errors, $thirdparty->errors); } else { $thirdparty->country_code = getCountry($thirdparty->country_id, 2, $db, $langs); $thirdparty->country = getCountry($thirdparty->country_code, 0, $db, $langs); @@ -549,18 +555,19 @@ print '
'; print '
'; -// Event summary -print '
'; +// Sub banner +print '
'; +print load_fiche_titre($langs->trans("NewSuggestionOfConference"), '', '', 0, 0, 'center'); +// Welcome message +print ''.$langs->trans("EvntOrgRegistrationWelcomeMessage").''; +print '
'; +// Title print ''.dol_escape_htmltag($project->title . ' '. $project->label).'
'; -print '

'."\n"; -print ''.$langs->trans("EvntOrgRegistrationWelcomeMessage")."\n"; -print $project->note_public."\n"; -//print img_picto('', 'map-marker-alt').$langs->trans("Location").': xxxx'; print '
'; // Help text -print '
'; +print '
'; if ($project->date_start_event || $project->date_end_event) { print '
'; @@ -590,15 +597,16 @@ if ($project->date_start_event || $project->date_end_event) { if ($project->location) { print ''.dol_escape_htmltag($project->location).'
'; } +if ($project->note_public) { + print '
'.dol_htmlentitiesbr($project->note_public).'
'; +} print '
'; print '
'; -print load_fiche_titre($langs->trans("NewSuggestionOfBooth"), '', '', 0, 0, 'center'); - -dol_htmloutput_errors($errmsg); +dol_htmloutput_errors($errmsg, $errors); // Print form print '
'."\n"; diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 77196c8c6fa..8fe19b940d8 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -85,7 +85,7 @@ if ($resultproject < 0) { } // Security check -$securekeyreceived = GETPOST("securekey"); +$securekeyreceived = GETPOST('securekey', 'alpha'); $securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 'md5'); if ($securekeytocompare != $securekeyreceived) { @@ -239,17 +239,26 @@ if (empty($reshook) && $action == 'add') { $thirdparty = new Societe($db); $resultfetchthirdparty = $thirdparty->fetch('', $societe); - if ($resultfetchthirdparty<=0) { - // Need to create a new one (not found or multiple with the same name) - $thirdparty->name = $societe; + if ($resultfetchthirdparty < 0) { + // If an error was found + $error++; + $errmsg .= $thirdparty->error; + $errors = array_merge($errors, $thirdparty->errors); + } elseif ($resultfetchthirdparty == 0) { // No thirdparty found + a payment is expected + // Creation of a new thirdparty + if (!empty($societe)) { + $thirdparty->name = $societe; + } else { + $thirdparty->name = $genericcompanyname; + } $thirdparty->address = GETPOST("address"); $thirdparty->zip = GETPOST("zipcode"); $thirdparty->town = GETPOST("town"); - $thirdparty->client = 2; + $thirdparty->client = $thirdparty::PROSPECT; $thirdparty->fournisseur = 0; $thirdparty->country_id = GETPOST("country_id", 'int'); $thirdparty->state_id = GETPOST("state_id", 'int'); - $thirdparty->email = $email; + $thirdparty->email = ($emailcompany ? $emailcompany : $email); // Load object modCodeTiers $module = (!empty($conf->global->SOCIETE_CODECLIENT_ADDON) ? $conf->global->SOCIETE_CODECLIENT_ADDON : 'mod_codeclient_leopard'); @@ -273,6 +282,7 @@ if (empty($reshook) && $action == 'add') { if ($readythirdparty <0) { $error++; $errmsg .= $thirdparty->error; + $errors = array_merge($errors, $thirdparty->errors); } else { $thirdparty->country_code = getCountry($thirdparty->country_id, 2, $db, $langs); $thirdparty->country = getCountry($thirdparty->country_code, 0, $db, $langs); @@ -420,7 +430,7 @@ if (empty($reshook) && $action == 'add') { // Get email content from template $arraydefaultmessage = null; - $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF; + $labeltouse = getDolGlobalString('EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF'); if (!empty($labeltouse)) { $arraydefaultmessage = $formmail->getEMailTemplate($db, 'conferenceorbooth', $user, $outputlangs, $labeltouse, 1, ''); } @@ -458,7 +468,7 @@ if (empty($reshook) && $action == 'add') { if (!$error) { $db->commit(); $securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); - $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.$id.'&securekey='.$securekeyurl; + $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl); Header("Location: ".$redirection); exit; } else { @@ -482,17 +492,18 @@ print '
'; print '
'; -// Event summary -print '
'; +// Sub banner +print '
'; +print load_fiche_titre($langs->trans("NewSuggestionOfConference"), '', '', 0, 0, 'center'); +// Welcome message +print ''.$langs->trans("EvntOrgRegistrationWelcomeMessage").''; +print '
'; +// Title print ''.dol_escape_htmltag($project->title . ' '. $project->label).'
'; -print '

'."\n"; -print ''.$langs->trans("EvntOrgRegistrationWelcomeMessage")."\n"; -print $project->note_public."\n"; -//print img_picto('', 'map-marker-alt').$langs->trans("Location").': xxxx'; print '
'; // Help text -print '
'; +print '
'; if ($project->date_start_event || $project->date_end_event) { print '
'; @@ -522,14 +533,14 @@ if ($project->date_start_event || $project->date_end_event) { if ($project->location) { print ''.dol_escape_htmltag($project->location).'
'; } +if ($project->note_public) { + print '
'.dol_htmlentitiesbr($project->note_public).'
'; +} print '
'; print '
'; -print load_fiche_titre($langs->trans("NewSuggestionOfConference"), '', '', 0, 0, 'center'); - - dol_htmloutput_errors($errmsg, $errors); From fae72ed74bbc2bb0641c3df587fe53eab89b0823 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 May 2023 04:58:20 +0200 Subject: [PATCH 5/5] Debug v17 --- htdocs/public/project/index.php | 47 ++------------------------------- 1 file changed, 2 insertions(+), 45 deletions(-) diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php index 946c6de30fc..739f0705868 100644 --- a/htdocs/public/project/index.php +++ b/htdocs/public/project/index.php @@ -138,9 +138,9 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $ print '
'; } - if (!empty($conf->global->PROJECT_IMAGE_PUBLIC_SUGGEST_CONFERENCE)) { + if (!empty($conf->global->PROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT)) { print '
'; - print ''; + print ''; print '
'; } @@ -220,49 +220,6 @@ print 'logo_small; -$logo = $mysoc->logo; -$paramlogo = 'ONLINE_PAYMENT_LOGO_'.$suffix; -if (!empty($conf->global->$paramlogo)) { - $logosmall = $conf->global->$paramlogo; -} elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) { - $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; -} -//print '- Show logo (logosmall='.$logosmall.' logo='.$logo.') '."\n"; -// Define urllogo -$urllogo = ''; -$urllogofull = ''; -if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { - $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); - $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); -} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { - $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); - $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); -} - -// Output html code for logo -if ($urllogo) { - print '
'; - print '
'; - print ''; - print '
'; - if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print ''; - } - print '
'; -} - -if (!empty($conf->global->PROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT)) { - print '
'; - print ''; - print '
'; -} - - - print '
'; print '
';