24if (!defined(
'NOLOGIN')) {
27if (!defined(
'NOCSRFCHECK')) {
28 define(
"NOCSRFCHECK", 1);
30if (!defined(
'NOIPCHECK')) {
31 define(
'NOIPCHECK',
'1');
33if (!defined(
'NOBROWSERNOTIF')) {
34 define(
'NOBROWSERNOTIF',
'1');
39$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))));
40if (is_numeric($entity)) {
41 define(
"DOLENTITY", $entity);
45require
'../../main.inc.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
47require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
48require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
49require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
50require_once DOL_DOCUMENT_ROOT.
'/societe/class/societeaccount.class.php';
51require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
52require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
54global $dolibarr_main_url_root;
57$langs->loadLangs(array(
"other",
"dict",
"bills",
"companies",
"errors",
"paybox",
"paypal",
"stripe"));
62$action =
GETPOST(
'action',
'aZ09');
64$securekeyreceived =
GETPOST(
"securekey",
'alpha');
67if ($securekeytocompare != $securekeyreceived) {
68 print $langs->trans(
'MissingOrBadSecureKey');
75$urlwithroot = DOL_MAIN_URL_ROOT;
78$resultproject = $project->fetch($id);
79if ($resultproject < 0) {
81 $errmsg .= $project->error;
84$hookmanager->initHooks(array(
'newpayment'));
88$user->loadDefaultValues();
91if (empty($conf->project->enabled)) {
108function llxHeaderVierge($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs =
'', $arrayofcss =
'')
110 global $user, $conf, $langs, $mysoc;
112 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
114 print
'<body id="mainbody" class="publicnewmemberform">';
117 $urllogo = DOL_URL_ROOT.
'/theme/common/login_logo.png';
119 if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$mysoc->logo_small)) {
120 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/thumbs/'.$mysoc->logo_small);
121 } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$mysoc->logo)) {
122 $urllogo = DOL_URL_ROOT.
'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode(
'logos/'.$mysoc->logo);
123 } elseif (is_readable(DOL_DOCUMENT_ROOT.
'/theme/dolibarr_logo.svg')) {
124 $urllogo = DOL_URL_ROOT.
'/theme/dolibarr_logo.svg';
127 print
'<div class="center">';
130 print
'<div class="backgreypublicpayment">';
131 print
'<div class="logopublicpayment">';
132 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
135 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
136 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>';
141 if (!empty($conf->global->PROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT)) {
142 print
'<div class="backimagepubliceventorganizationsubscription">';
143 print
'<img id="idPROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT" src="'.$conf->global->PROJECT_IMAGE_PUBLIC_ORGANIZEDEVENT.
'">';
149 print
'<div class="divmainbodylarge">';
173 header(
"Location: ".
dol_buildpath(
'/public/project/suggestbooth.php', 1).
'?id='.$id.
"&securekey=".$securekeyreceived);
177if (
GETPOST(
'suggestconference')) {
178 header(
"Location: ".
dol_buildpath(
'/public/project/suggestconference.php', 1).
'?id='.$id.
"&securekey=".$securekeyreceived);
183 header(
"Location: ".
dol_buildpath(
'/public/project/viewandvote.php', 1).
'?id='.$id.
"&securekey=".$securekeyreceived);
195if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) {
196 $head =
'<link rel="stylesheet" type="text/css" href="'.$conf->global->ONLINE_PAYMENT_CSS_URL.
'?lang='.$langs->defaultlang.
'">'.
"\n";
199$conf->dol_hide_topmenu = 1;
200$conf->dol_hide_leftmenu = 1;
202$replacemainarea = (empty($conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
204llxHeader($head, $langs->trans(
"SuggestForm"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea);
210print
'<span id="dolpaymentspan"></span>'.
"\n";
211print
'<div class="center">'.
"\n";
213print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
214print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
215print
'<input type="hidden" name="action" value="dopayment">'.
"\n";
216print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
218print
'<input type="hidden" name="id" value="'.dol_escape_htmltag($id).
'">'.
"\n";
219print
'<input type="hidden" name="securekey" value="'.dol_escape_htmltag($securekeyreceived).
'">'.
"\n";
220print
'<input type="hidden" name="e" value="'.$entity.
'" />';
221print
'<input type="hidden" name="forcesandbox" value="'.GETPOST(
'forcesandbox',
'int').
'" />';
225print
'<div align="center">';
226print
'<div id="divsubscribe">';
230print
'<div class="center subscriptionformbanner subbanner justify margintoponly paddingtop marginbottomonly padingbottom">';
231print
load_fiche_titre($langs->trans(
"NewRegistration"),
'',
'', 0, 0,
'center');
233print
'<span class="opacitymedium">'.$langs->trans(
"EvntOrgRegistrationWelcomeMessage").
'</span>';
236print
'<span class="eventlabel large">'.dol_escape_htmltag($project->title .
' '. $conference->label).
'</span><br>';
240print
'<div class="justify subscriptionformhelptext">';
242if ($project->date_start_event || $project->date_end_event) {
243 print
'<br><span class="fa fa-calendar pictofixedwidth opacitymedium"></span>';
245if ($project->date_start_event) {
247 $tmparray =
dol_getdate($project->date_start_event,
false,
'');
248 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
253if ($project->date_start_event && $project->date_end_event) {
256if ($project->date_end_event) {
258 $tmparray =
dol_getdate($project->date_end_event,
false,
'');
259 if ($tmparray[
'hours'] || $tmparray[
'minutes'] || $tmparray[
'minutes']) {
264if ($project->date_start_event || $project->date_end_event) {
267if ($project->location) {
268 print
'<span class="fa fa-map-marked-alt pictofixedwidth opacitymedium"></span>'.dol_escape_htmltag($project->location).
'<br>';
276print
'<table id="dolpaymenttable" summary="Payment form" class="center">'.
"\n";
281print
'<tr><td align="center">';
297if ($project->accept_booth_suggestions) {
299 print
'<input type="submit" value="'.$langs->trans(
"SuggestBooth").
'" id="suggestbooth" name="suggestbooth" class="button width500">';
302if ($project->accept_conference_suggestions == 1 || $project->accept_conference_suggestions == 2) {
304 print
'<input type="submit" value="'.$langs->trans(
"SuggestConference").
'" id="suggestconference" name="suggestconference" class="button width500">';
307if ($project->accept_conference_suggestions == 2 || $project->accept_conference_suggestions == 3) {
309 print
'<input type="submit" value="'.$langs->trans(
"ViewAndVote").
'" id="viewandvote" name="viewandvote" class="button width500">';
313 print
'<span class="opacitymedium">'.$langs->trans(
"NoPublicActionsAllowedForThisEvent").
'</span>';
316print
'</td></tr>'.
"\n";
318print
'</table>'.
"\n";
if(!defined( 'NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined( 'NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) if(!defined( 'NOLOGIN')) if(!defined('NOCSRFCHECK')) if(!defined( 'NOIPCHECK')) llxHeaderVierge()
Header function.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage projects.
htmlPrintOnlineFooter($fromcompany, $langs, $addformmessage=0, $suffix='', $object=null)
Show footer of company in HTML pages.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
printCommonFooter($zone='private')
Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global-...
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
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.
getDolGlobalString($key, $default='')
Return 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='', $arrayofcss='', $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Ouput html header of a page.
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')
Returns a hash (non reversible encryption) of a string.