Fix public pages
This commit is contained in:
parent
0c30a423ab
commit
49fa0f3107
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2021 Dorian Vabre <dorian.vabre@gmail.com>
|
||||
* Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
@ -678,22 +679,25 @@ $formcompany = new FormCompany($db);
|
||||
|
||||
llxHeaderVierge($langs->trans("NewRegistration"));
|
||||
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("NewRegistration"), '', '', 0, 0, 'center');
|
||||
|
||||
|
||||
print '<div align="center">';
|
||||
print '<div id="divsubscribe">';
|
||||
print '<div class="center subscriptionformhelptext justify">';
|
||||
|
||||
// Sub banner
|
||||
print '<div class="center subscriptionformbanner subbanner justify margintoponly paddingtop marginbottomonly padingbottom">';
|
||||
print load_fiche_titre($langs->trans("NewRegistration"), '', '', 0, 0, 'center');
|
||||
// Welcome message
|
||||
print '<span class="opacitymedium">'.$langs->trans("EvntOrgWelcomeMessage").'</span>';
|
||||
print '<br>';
|
||||
|
||||
// Title
|
||||
print '<span class="eventlabel">'.dol_escape_htmltag($project->title . ' '. $conference->label).'</span><br>';
|
||||
print '<span class="eventlabel large">'.dol_escape_htmltag($project->title . ' '. $conference->label).'</span><br>';
|
||||
print '</div>';
|
||||
|
||||
// Help text
|
||||
print '<div class="justify subscriptionformhelptext">';
|
||||
|
||||
if ($project->date_start_event || $project->date_end_event) {
|
||||
print '<br><span class="fa fa-calendar pictofixedwidth"></span>';
|
||||
print '<br><span class="fa fa-calendar pictofixedwidth opacitymedium"></span>';
|
||||
}
|
||||
if ($project->date_start_event) {
|
||||
$format = 'day';
|
||||
@ -718,29 +722,31 @@ if ($project->date_start_event || $project->date_end_event) {
|
||||
print '<br>';
|
||||
}
|
||||
if ($project->location) {
|
||||
print '<span class="fa fa-map-marked-alt pictofixedwidth"></span>'.dol_escape_htmltag($project->location).'<br>';
|
||||
print '<span class="fa fa-map-marked-alt pictofixedwidth opacitymedium"></span>'.dol_escape_htmltag($project->location).'<br>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
$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 '</div>';
|
||||
|
||||
if ($maxattendees && $currentnbofattendees >= $maxattendees) {
|
||||
print '<br>';
|
||||
@ -882,12 +888,13 @@ if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS
|
||||
print "</form>\n";
|
||||
|
||||
print "<br>";
|
||||
print '</div></div>';
|
||||
}
|
||||
} else {
|
||||
print $langs->trans("ConferenceIsNotConfirmed");
|
||||
}
|
||||
|
||||
print '</div></div>';
|
||||
|
||||
llxFooterVierge();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -125,10 +125,13 @@ $conf->dol_hide_topmenu = 1;
|
||||
$conf->dol_hide_leftmenu = 1;
|
||||
|
||||
$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
|
||||
|
||||
llxHeader($head, $langs->trans("SuggestForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea);
|
||||
|
||||
|
||||
print '<span id="dolpaymentspan"></span>'."\n";
|
||||
print '<div class="center">'."\n";
|
||||
|
||||
print '<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
|
||||
print '<input type="hidden" name="action" value="dopayment">'."\n";
|
||||
@ -185,21 +188,55 @@ if (!empty($conf->global->PROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT)) {
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<div align="center">';
|
||||
print '<div id="divsubscribe">';
|
||||
|
||||
|
||||
// Event summary
|
||||
print '<div class="center">';
|
||||
print '<span class="large">'.$project->title.'</span><br>';
|
||||
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 '<span class="eventlabel large">'.dol_escape_htmltag($project->title . ' '. $project->label).'</span><br>';
|
||||
print '<br><br>'."\n";
|
||||
print $langs->trans("EvntOrgRegistrationWelcomeMessage")."\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("EvntOrgRegistrationWelcomeMessage")."</span>\n";
|
||||
print $project->note_public."\n";
|
||||
//print img_picto('', 'map-marker-alt').$langs->trans("Location").': xxxx';
|
||||
print '</div>';
|
||||
|
||||
|
||||
// Help text
|
||||
print '<div class="center subscriptionformhelptext">';
|
||||
|
||||
if ($project->date_start_event || $project->date_end_event) {
|
||||
print '<br><span class="fa fa-calendar pictofixedwidth opacitymedium"></span>';
|
||||
}
|
||||
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 '<br>';
|
||||
}
|
||||
if ($project->location) {
|
||||
print '<span class="fa fa-map-marked-alt pictofixedwidth opacitymedium"></span>'.dol_escape_htmltag($project->location).'<br>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<table id="dolpaymenttable" summary="Payment form" class="center">'."\n";
|
||||
@ -246,11 +283,16 @@ print '</td></tr>'."\n";
|
||||
|
||||
print '</table>'."\n";
|
||||
|
||||
|
||||
print '</div></div>';
|
||||
|
||||
|
||||
print '</form>'."\n";
|
||||
print '</div>'."\n";
|
||||
print '<br>';
|
||||
|
||||
|
||||
|
||||
htmlPrintOnlineFooter($mysoc, $langs, 1, $suffix, $object);
|
||||
|
||||
llxFooter('', 'public');
|
||||
|
||||
@ -475,6 +475,7 @@ if (empty($reshook) && $action == 'add') {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
|
||||
@ -540,30 +541,61 @@ $formcompany = new FormCompany($db);
|
||||
|
||||
llxHeaderVierge($langs->trans("NewSuggestionOfBooth"));
|
||||
|
||||
|
||||
print '<div align="center">';
|
||||
print '<div id="divsubscribe">';
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Event summary
|
||||
print '<div class="center">';
|
||||
print '<span class="large">'.$project->title.'</span><br>';
|
||||
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 '<span class="eventlabel large">'.dol_escape_htmltag($project->title . ' '. $project->label).'</span><br>';
|
||||
print '<br><br>'."\n";
|
||||
//print $langs->trans("EvntOrgRegistrationWelcomeMessage")."\n";
|
||||
//print $project->note_public."\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("EvntOrgRegistrationWelcomeMessage")."</span>\n";
|
||||
print $project->note_public."\n";
|
||||
//print img_picto('', 'map-marker-alt').$langs->trans("Location").': xxxx';
|
||||
print '</div>';
|
||||
|
||||
|
||||
// Help text
|
||||
print '<div class="center subscriptionformhelptext">';
|
||||
|
||||
if ($project->date_start_event || $project->date_end_event) {
|
||||
print '<br><span class="fa fa-calendar pictofixedwidth opacitymedium"></span>';
|
||||
}
|
||||
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 '<br>';
|
||||
}
|
||||
if ($project->location) {
|
||||
print '<span class="fa fa-map-marked-alt pictofixedwidth opacitymedium"></span>'.dol_escape_htmltag($project->location).'<br>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("NewSuggestionOfBooth"), '', '', 0, 0, 'center');
|
||||
|
||||
|
||||
print '<div align="center">';
|
||||
print '<div id="divsubscribe">';
|
||||
print '<div class="center subscriptionformhelptext opacitymedium justify">';
|
||||
|
||||
dol_htmloutput_errors($errmsg);
|
||||
|
||||
// Print form
|
||||
@ -574,7 +606,6 @@ print '<input type="hidden" name="action" value="add" />';
|
||||
print '<input type="hidden" name="id" value="'.$id.'" />';
|
||||
print '<input type="hidden" name="securekey" value="'.$securekeyreceived.'" />';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<br><span class="opacitymedium">'.$langs->trans("FieldsWithAreMandatory", '*').'</span><br>';
|
||||
//print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
|
||||
@ -614,8 +645,7 @@ print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'se
|
||||
print '</td></tr>';
|
||||
// Country
|
||||
print '<tr><td>'.$langs->trans('Country');
|
||||
print '<span style="color:red">*</span>';
|
||||
|
||||
print '<span class="star">*</span>';
|
||||
print '</td><td>';
|
||||
$country_id = GETPOST('country_id');
|
||||
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
|
||||
@ -668,7 +698,6 @@ print '</div>';
|
||||
print '<br><br>';
|
||||
|
||||
|
||||
|
||||
print "</form>\n";
|
||||
print "<br>";
|
||||
print '</div></div>';
|
||||
|
||||
@ -70,8 +70,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');
|
||||
|
||||
@ -452,6 +452,7 @@ if (empty($reshook) && $action == 'add') {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
$securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||
@ -473,29 +474,60 @@ $formcompany = new FormCompany($db);
|
||||
|
||||
llxHeaderVierge($langs->trans("NewSuggestionOfConference"));
|
||||
|
||||
|
||||
print '<div align="center">';
|
||||
print '<div id="divsubscribe">';
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Event summary
|
||||
print '<div class="center">';
|
||||
print '<span class="large">'.$project->title.'</span><br>';
|
||||
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 '<span class="eventlabel large">'.dol_escape_htmltag($project->title . ' '. $project->label).'</span><br>';
|
||||
print '<br><br>'."\n";
|
||||
//print $langs->trans("EvntOrgRegistrationWelcomeMessage")."\n";
|
||||
//print $project->note_public."\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("EvntOrgRegistrationWelcomeMessage")."</span>\n";
|
||||
print $project->note_public."\n";
|
||||
//print img_picto('', 'map-marker-alt').$langs->trans("Location").': xxxx';
|
||||
print '</div>';
|
||||
|
||||
// Help text
|
||||
print '<div class="center subscriptionformhelptext">';
|
||||
|
||||
if ($project->date_start_event || $project->date_end_event) {
|
||||
print '<br><span class="fa fa-calendar pictofixedwidth opacitymedium"></span>';
|
||||
}
|
||||
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 '<br>';
|
||||
}
|
||||
if ($project->location) {
|
||||
print '<span class="fa fa-map-marked-alt pictofixedwidth opacitymedium"></span>'.dol_escape_htmltag($project->location).'<br>';
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("NewSuggestionOfConference"), '', '', 0, 0, 'center');
|
||||
|
||||
|
||||
print '<div align="center">';
|
||||
print '<div id="divsubscribe">';
|
||||
print '<div class="center subscriptionformhelptext opacitymedium justify">';
|
||||
|
||||
dol_htmloutput_errors($errmsg, $errors);
|
||||
|
||||
@ -507,8 +539,6 @@ print '<input type="hidden" name="action" value="add" />';
|
||||
print '<input type="hidden" name="id" value="'.$id.'" />';
|
||||
print '<input type="hidden" name="securekey" value="'.$securekeyreceived.'" />';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<br><span class="opacitymedium">'.$langs->trans("FieldsWithAreMandatory", '*').'</span><br>';
|
||||
//print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
|
||||
|
||||
@ -584,10 +614,10 @@ print '<tr><td>'.$langs->trans("Format").'<span class="star">*</span></td>'."\n"
|
||||
print '<td>'.Form::selectarray('eventtype', $arrayofconfboothtype, $eventtype, 1).'</td>';
|
||||
// Label
|
||||
print '<tr><td>'.$langs->trans("LabelOfconference").'<span class="star">*</span></td>'."\n";
|
||||
print '</td><td><input type="text" name="label" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('label')).'"></td></tr>'."\n";
|
||||
print '</td><td><input type="text" name="label" class="minwidth300" value="'.dol_escape_htmltag(GETPOST('label')).'"></td></tr>'."\n";
|
||||
// Note
|
||||
print '<tr><td>'.$langs->trans("Description").'<span class="star">*</span></td>'."\n";
|
||||
print '<td><textarea name="note" id="note" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('note', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n";
|
||||
print '<td><textarea name="note" id="note" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_4.'">'.dol_escape_htmltag(GETPOST('note', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n";
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user