27if (!defined(
'NOLOGIN')) {
30if (!defined(
'NOCSRFCHECK')) {
31 define(
"NOCSRFCHECK", 1);
33if (!defined(
'NOIPCHECK')) {
34 define(
'NOIPCHECK',
'1');
36if (!defined(
'NOBROWSERNOTIF')) {
37 define(
'NOBROWSERNOTIF',
'1');
43$entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : (!empty($_GET[
'e']) ? (int) $_GET[
'e'] : (!empty($_POST[
'e']) ? (int) $_POST[
'e'] : 1))));
44if (is_numeric($entity)) {
45 define(
"DOLENTITY", $entity);
49require
'../../main.inc.php';
50require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
51require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
52require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
53require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
54require_once DOL_DOCUMENT_ROOT.
'/societe/class/societeaccount.class.php';
55require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
56require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
70$langs->loadLangs(array(
"other",
"dict",
"bills",
"companies",
"errors",
"paypal",
"stripe"));
77$action =
GETPOST(
'action',
'aZ09');
79$securekeyreceived =
GETPOST(
"securekey",
'alpha');
82if ($securekeytocompare != $securekeyreceived) {
83 print $langs->trans(
'MissingOrBadSecureKey');
90$urlwithroot = DOL_MAIN_URL_ROOT;
93$resultproject = $project->fetch($id);
94if ($resultproject < 0) {
96 $errmsg .= $project->error;
99$hookmanager->initHooks(array(
'newpayment'));
103$user->loadDefaultValues();
106if (empty($conf->project->enabled)) {
125function llxHeaderVierge($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [])
127 global $conf, $langs,
$mysoc;
129 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
131 print
'<body id="mainbody" class="publicnewmemberform">';
134 $urllogo = DOL_URL_ROOT.
'/theme/common/login_logo.png';
136 if (!empty(
$mysoc->logo_small) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.
$mysoc->logo_small)) {
137 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.
$mysoc->logo_small);
138 } elseif (!empty(
$mysoc->logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.
$mysoc->logo)) {
139 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/'.
$mysoc->logo);
140 } elseif (is_readable(DOL_DOCUMENT_ROOT.
'/theme/dolibarr_logo.svg')) {
141 $urllogo = DOL_URL_ROOT.
'/theme/dolibarr_logo.svg';
144 print
'<div class="center">';
146 print
'<div class="backgreypublicpayment">';
147 print
'<div class="logopublicpayment">';
149 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'">';
151 if (empty($urllogo)) {
156 print
'<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans(
"PoweredBy").
'<br><img class="poweredbyimg" src="'.DOL_URL_ROOT.
'/theme/dolibarr_logo.svg" width="80px"></a></div>';
161 print
'<div class="backimagepubliceventorganizationsubscription">';
162 print
'<img id="idPROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT" src="' .
getDolGlobalString(
'PROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT').
'">';
168 print
'<div class="divmainbodylarge">';
194 header(
"Location: ".
dol_buildpath(
'/public/project/suggestbooth.php', 1).
'?id='.
$id.
"&securekey=".$securekeyreceived);
198if (
GETPOST(
'suggestconference')) {
199 header(
"Location: ".
dol_buildpath(
'/public/project/suggestconference.php', 1).
'?id='.
$id.
"&securekey=".$securekeyreceived);
204 header(
"Location: ".
dol_buildpath(
'/public/project/viewandvote.php', 1).
'?id='.
$id.
"&securekey=".$securekeyreceived);
215 $head =
'<link rel="stylesheet" type="text/css" href="' .
getDolGlobalString(
'ONLINE_PAYMENT_CSS_URL').
'?lang='.$langs->defaultlang.
'">'.
"\n";
218$conf->dol_hide_topmenu = 1;
219$conf->dol_hide_leftmenu = 1;
221$replacemainarea = (empty($conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
228print
'<span id="dolpaymentspan"></span>'.
"\n";
229print
'<div class="center">'.
"\n";
231print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
232print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
233print
'<input type="hidden" name="action" value="dopayment">'.
"\n";
234print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
236print
'<input type="hidden" name="id" value="'.dol_escape_htmltag((
string) $id).
'">'.
"\n";
237print
'<input type="hidden" name="securekey" value="'.dol_escape_htmltag($securekeyreceived).
'">'.
"\n";
238print
'<input type="hidden" name="e" value="'.$entity.
'" />';
243print
'<div class="centergrid">';
244print
'<div id="divsubscribe">';
248print
'<div class="center subscriptionformbanner subbanner justify margintoponly paddingtop marginbottomonly padingbottom">';
249print
load_fiche_titre($langs->trans(
"NewRegistration"),
'',
'', 0,
'',
'center');
252print
'<span class="opacitymedium">'.$langs->trans(
"EvntOrgRegistrationWelcomeMessage").
'</span>';
255print
'<span class="eventlabel large">'.dol_escape_htmltag($project->title).
'</span><br>';
259print
'<div class="justify subscriptionformhelptext">';
261if ($project->date_start_event || $project->date_end_event) {
262 print
'<br><span class="fa fa-calendar pictofixedwidth opacitymedium"></span>';
264if ($project->date_start_event) {
266 $tmparray =
dol_getdate($project->date_start_event,
false,
'');
267 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
272if ($project->date_start_event && $project->date_end_event) {
275if ($project->date_end_event) {
277 $tmparray =
dol_getdate($project->date_end_event,
false,
'');
278 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
283if ($project->date_start_event || $project->date_end_event) {
286if ($project->location) {
287 print
'<span class="fa fa-map-marked-alt pictofixedwidth opacitymedium"></span>'.dol_escape_htmltag($project->location).
'<br>';
295print
'<table id="dolsuggestboost" summary="Suggest a boost form" class="center">'.
"\n";
298print
'<tr><td class="center">';
308if ($project->accept_booth_suggestions) {
310 print
'<input type="submit" value="'.$langs->trans(
"SuggestBooth").
'" id="suggestbooth" name="suggestbooth" class="button minwidth250">';
313if ($project->accept_conference_suggestions == 1 || $project->accept_conference_suggestions == 2) {
315 print
'<input type="submit" value="'.$langs->trans(
"SuggestConference").
'" id="suggestconference" name="suggestconference" class="button minwidth250">';
318if ($project->accept_conference_suggestions == 2 || $project->accept_conference_suggestions == 3) {
320 print
'<input type="submit" value="'.$langs->trans(
"ViewAndVote").
'" id="viewandvote" name="viewandvote" class="button minwidth250">';
324 print
'<span class="opacitymedium">'.$langs->trans(
"NoPublicActionsAllowedForThisEvent").
'</span>';
327print
'</td></tr>'.
"\n";
329print
'</table>'.
"\n";
$id
Support class for third parties, contacts, members, users or resources.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Class to manage projects.
htmlPrintOnlineFooter($fromcompany, $langs, $addformmessage=0, $suffix='', $object=null)
Show footer of company in HTML public pages.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
printCommonFooter($zone='private')
Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global-...
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Output html header of a page.
llxHeaderVierge($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs=[], $arrayofcss=[])
Show header for booking.
llxFooterVierge()
Show footer for demo.
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.
dol_hash($chain, $type='0', $nosalt=0, $mode=0)
Returns a hash (non reversible encryption) of a string.