diff --git a/htdocs/public/eventorganization/attendee_new.php b/htdocs/public/eventorganization/attendee_new.php index a345897070c..1b9a555f246 100644 --- a/htdocs/public/eventorganization/attendee_new.php +++ b/htdocs/public/eventorganization/attendee_new.php @@ -1,5 +1,6 @@ + * Copyright (C) 2023 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -680,22 +681,25 @@ $formcompany = new FormCompany($db); llxHeaderVierge($langs->trans("NewRegistration")); -print '
'; -print load_fiche_titre($langs->trans("NewRegistration"), '', '', 0, 0, 'center'); - print '
'; print '
'; -print '
'; +// Sub banner +print '
'; +print load_fiche_titre($langs->trans("NewRegistration"), '', '', 0, 0, 'center'); // Welcome message print ''.$langs->trans("EvntOrgWelcomeMessage").''; print '
'; - // Title -print ''.dol_escape_htmltag($project->title . ' '. $conference->label).'
'; +print ''.dol_escape_htmltag($project->title . ' '. $conference->label).'
'; +print '
'; + +// Help text +print '
'; + if ($project->date_start_event || $project->date_end_event) { - print '
'; + print '
'; } if ($project->date_start_event) { $format = 'day'; @@ -720,29 +724,31 @@ if ($project->date_start_event || $project->date_end_event) { print '
'; } if ($project->location) { - print ''.dol_escape_htmltag($project->location).'
'; + print ''.dol_escape_htmltag($project->location).'
'; } +print '
'; + + $maxattendees = 0; if ($conference->id > 0) { /* date of project is not date of event so commented - print $langs->trans("Date").': '; - print dol_print_date($conference->datep); - if ($conference->date_end) { - print ' - '; - print dol_print_date($conference->datef); - }*/ + print $langs->trans("Date").': '; + print dol_print_date($conference->datep); + if ($conference->date_end) { + print ' - '; + print dol_print_date($conference->datef); + }*/ } else { /* date of project is not date of event so commented - print $langs->trans("Date").': '; - print dol_print_date($project->date_start); - if ($project->date_end) { - print ' - '; - print dol_print_date($project->date_end); - }*/ + print $langs->trans("Date").': '; + print dol_print_date($project->date_start); + if ($project->date_end) { + print ' - '; + print dol_print_date($project->date_end); + }*/ $maxattendees = $project->max_attendees; // Max attendeed for the project/event } -print '
'; if ($maxattendees && $currentnbofattendees >= $maxattendees) { print '
'; @@ -884,12 +890,15 @@ if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS print "\n"; print "
"; - print '
'; } } else { + print '

'; print $langs->trans("ConferenceIsNotConfirmed"); + print '

'; } +print ''; + llxFooterVierge(); $db->close(); diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php index dfcfde94b17..3488fe8e4c4 100644 --- a/htdocs/public/project/index.php +++ b/htdocs/public/project/index.php @@ -124,10 +124,14 @@ $conf->dol_hide_topmenu = 1; $conf->dol_hide_leftmenu = 1; $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '
' : '').'
'; -llxHeader($head, $langs->trans("SuggestForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea); + + +llxHeaderVierge($langs->trans("SuggestForm")); + print ''."\n"; print '
'."\n"; + print '
'."\n"; print ''."\n"; print ''."\n"; @@ -150,7 +154,7 @@ if (!empty($conf->global->$paramlogo)) { } elseif (!empty($conf->global->ONLINE_PAYMENT_LOGO)) { $logosmall = $conf->global->ONLINE_PAYMENT_LOGO; } -//print ''."\n"; +//print '- Show logo (logosmall='.$logosmall.' logo='.$logo.') '."\n"; // Define urllogo $urllogo = ''; $urllogofull = ''; @@ -184,21 +188,55 @@ if (!empty($conf->global->PROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT)) { print '
'; +print '
'; +print '
'; + + // Event summary print '
'; -print ''.$project->title.'
'; -print img_picto('', 'calendar', 'class="pictofixedwidth"').$langs->trans("Date").': '; -print dol_print_date($project->date_start, 'daytext'); -if ($project->date_end && $project->date_start != $project->date_end) { - print ' - '.dol_print_date($project->date_end, 'daytext'); -} +print ''.dol_escape_htmltag($project->title . ' '. $project->label).'
'; print '

'."\n"; -print $langs->trans("EvntOrgRegistrationWelcomeMessage")."\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 '
'; + +if ($project->date_start_event || $project->date_end_event) { + print '
'; +} +if ($project->date_start_event) { + $format = 'day'; + $tmparray = dol_getdate($project->date_start_event, false, ''); + if ($tmparray['hours'] || $tmparray['minutes'] || $tmparray['minutes']) { + $format = 'dayhour'; + } + print dol_print_date($project->date_start_event, $format); +} +if ($project->date_start_event && $project->date_end_event) { + print ' - '; +} +if ($project->date_end_event) { + $format = 'day'; + $tmparray = dol_getdate($project->date_end_event, false, ''); + if ($tmparray['hours'] || $tmparray['minutes'] || $tmparray['minutes']) { + $format = 'dayhour'; + } + print dol_print_date($project->date_end_event, $format); +} +if ($project->date_start_event || $project->date_end_event) { + print '
'; +} +if ($project->location) { + print ''.dol_escape_htmltag($project->location).'
'; +} + +print '
'; + + print '
'; print ''."\n"; @@ -245,6 +283,10 @@ print ''."\n"; print '
'."\n"; + +print '
'; + + print '
'."\n"; print '
'."\n"; print '
'; @@ -255,3 +297,61 @@ 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 '
'; +} diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index 0b2e24716d5..772822374d4 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -477,6 +477,7 @@ if (empty($reshook) && $action == 'add') { } } } + if (!$error) { $db->commit(); @@ -542,30 +543,61 @@ $formcompany = new FormCompany($db); llxHeaderVierge($langs->trans("NewSuggestionOfBooth")); + +print '
'; +print '
'; + print '
'; // Event summary print '
'; -print ''.$project->title.'
'; -print img_picto('', 'calendar', 'class="pictofixedwidth"').$langs->trans("Date").': '; -print dol_print_date($project->date_start, 'daytext'); -if ($project->date_end && $project->date_start != $project->date_end) { - print ' - '.dol_print_date($project->date_end, 'daytext'); -} +print ''.dol_escape_htmltag($project->title . ' '. $project->label).'
'; print '

'."\n"; -//print $langs->trans("EvntOrgRegistrationWelcomeMessage")."\n"; -//print $project->note_public."\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 '
'; + +if ($project->date_start_event || $project->date_end_event) { + print '
'; +} +if ($project->date_start_event) { + $format = 'day'; + $tmparray = dol_getdate($project->date_start_event, false, ''); + if ($tmparray['hours'] || $tmparray['minutes'] || $tmparray['minutes']) { + $format = 'dayhour'; + } + print dol_print_date($project->date_start_event, $format); +} +if ($project->date_start_event && $project->date_end_event) { + print ' - '; +} +if ($project->date_end_event) { + $format = 'day'; + $tmparray = dol_getdate($project->date_end_event, false, ''); + if ($tmparray['hours'] || $tmparray['minutes'] || $tmparray['minutes']) { + $format = 'dayhour'; + } + print dol_print_date($project->date_end_event, $format); +} +if ($project->date_start_event || $project->date_end_event) { + print '
'; +} +if ($project->location) { + print ''.dol_escape_htmltag($project->location).'
'; +} + +print '
'; + +print '
'; + print load_fiche_titre($langs->trans("NewSuggestionOfBooth"), '', '', 0, 0, 'center'); -print '
'; -print '
'; -print '
'; - dol_htmloutput_errors($errmsg); // Print form @@ -576,7 +608,6 @@ print ''; print ''; print ''; -print '
'; print '
'.$langs->trans("FieldsWithAreMandatory", '*').'
'; //print $langs->trans("FieldsWithIsForPublic",'**').'
'; @@ -616,8 +647,7 @@ print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'se print ''; // Country print ''.$langs->trans('Country'); -print '*'; - +print '*'; print ''; $country_id = GETPOST('country_id'); if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) { @@ -670,7 +700,6 @@ print '
'; print '

'; - print "\n"; print "
"; print '
'; diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index b3418ec9e84..77196c8c6fa 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -72,8 +72,8 @@ $email = GETPOST("email"); $societe = GETPOST("societe"); $label = GETPOST("label"); $note = GETPOST("note"); -$datestart = GETPOST("datestart"); -$dateend = GETPOST("dateend"); +$datestart = dol_mktime(0, 0, 0, GETPOST('datestartmonth', 'int'), GETPOST('datestartday', 'int'), GETPOST('datestartyear', 'int')); +$dateend = dol_mktime(23, 59, 59, GETPOST('dateendmonth', 'int'), GETPOST('dateendday', 'int'), GETPOST('dateendyear', 'int')); $id = GETPOST('id'); @@ -454,6 +454,7 @@ if (empty($reshook) && $action == 'add') { } } } + if (!$error) { $db->commit(); $securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); @@ -475,29 +476,60 @@ $formcompany = new FormCompany($db); llxHeaderVierge($langs->trans("NewSuggestionOfConference")); + +print '
'; +print '
'; + print '
'; // Event summary print '
'; -print ''.$project->title.'
'; -print img_picto('', 'calendar', 'class="pictofixedwidth"').$langs->trans("Date").': '; -print dol_print_date($project->date_start, 'daytext'); -if ($project->date_end && $project->date_start != $project->date_end) { - print ' - '.dol_print_date($project->date_end, 'daytext'); -} +print ''.dol_escape_htmltag($project->title . ' '. $project->label).'
'; print '

'."\n"; -//print $langs->trans("EvntOrgRegistrationWelcomeMessage")."\n"; -//print $project->note_public."\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 '
'; + +if ($project->date_start_event || $project->date_end_event) { + print '
'; +} +if ($project->date_start_event) { + $format = 'day'; + $tmparray = dol_getdate($project->date_start_event, false, ''); + if ($tmparray['hours'] || $tmparray['minutes'] || $tmparray['minutes']) { + $format = 'dayhour'; + } + print dol_print_date($project->date_start_event, $format); +} +if ($project->date_start_event && $project->date_end_event) { + print ' - '; +} +if ($project->date_end_event) { + $format = 'day'; + $tmparray = dol_getdate($project->date_end_event, false, ''); + if ($tmparray['hours'] || $tmparray['minutes'] || $tmparray['minutes']) { + $format = 'dayhour'; + } + print dol_print_date($project->date_end_event, $format); +} +if ($project->date_start_event || $project->date_end_event) { + print '
'; +} +if ($project->location) { + print ''.dol_escape_htmltag($project->location).'
'; +} + +print '
'; + +print '
'; print load_fiche_titre($langs->trans("NewSuggestionOfConference"), '', '', 0, 0, 'center'); -print '
'; -print '
'; -print '
'; dol_htmloutput_errors($errmsg, $errors); @@ -509,8 +541,6 @@ print ''; print ''; print ''; -print '
'; - print '
'.$langs->trans("FieldsWithAreMandatory", '*').'
'; //print $langs->trans("FieldsWithIsForPublic",'**').'
'; @@ -585,11 +615,11 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) { print ''.$langs->trans("Format").'*'."\n"; print ''.Form::selectarray('eventtype', $arrayofconfboothtype, $eventtype, 1).''; // Label -print ''.$langs->trans("LabelOfconference").'*'."\n"; -print ''."\n"; +print ''.$langs->trans("LabelOfconference").'*'."\n"; +print ''."\n"; // Note -print ''.$langs->trans("Description").'*'."\n"; -print ''."\n"; +print ''.$langs->trans("Description").'*'."\n"; +print ''."\n"; print "\n";