24 if (!defined(
'NOLOGIN')) {
27 if (!defined(
'NOCSRFCHECK')) {
28 define(
"NOCSRFCHECK", 1);
30 if (!defined(
'NOIPCHECK')) {
31 define(
'NOIPCHECK',
'1');
33 if (!defined(
'NOBROWSERNOTIF')) {
34 define(
'NOBROWSERNOTIF',
'1');
40 $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))));
41 if (is_numeric($entity)) {
42 define(
"DOLENTITY", $entity);
46 require
'../../main.inc.php';
47 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
48 require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
49 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
50 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
51 require_once DOL_DOCUMENT_ROOT.
'/societe/class/societeaccount.class.php';
52 require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
53 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
54 require_once DOL_DOCUMENT_ROOT .
'/comm/action/class/actioncomm.class.php';
59 $hookmanager->initHooks(array(
'newpayment'));
62 global $dolibarr_main_url_root;
65 $langs->loadLangs(array(
"main",
"other",
"dict",
"bills",
"companies",
"errors",
"paybox",
"paypal",
"stripe"));
71 $action =
GETPOST(
'action',
'aZ09');
73 $securekeyreceived =
GETPOST(
"securekey");
76 if ($securekeytocompare != $securekeyreceived) {
77 print $langs->trans(
'MissingOrBadSecureKey');
81 $listofvotes = explode(
',', $_SESSION[
"savevotes"]);
87 $urlwithroot = DOL_MAIN_URL_ROOT;
90 $resultproject = $project->fetch($id);
91 if ($resultproject < 0) {
93 $errmsg .= $project->error;
97 if (empty($conf->eventorganization->enabled)) {
106 $tmpthirdparty =
new Societe($db);
108 $listOfConferences =
'<tr><td>'.$langs->trans(
'Label').
'</td>';
109 $listOfConferences .=
'<td>'.$langs->trans(
'Type').
'</td>';
110 $listOfConferences .=
'<td>'.$langs->trans(
'ThirdParty').
'</td>';
111 $listOfConferences .=
'<td>'.$langs->trans(
'Note').
'</td></tr>';
113 $sql =
"SELECT a.id, a.fk_action, a.datep, a.datep2, a.label, a.fk_soc, a.note, ca.libelle as label
114 FROM ".MAIN_DB_PREFIX.
"actioncomm as a
115 INNER JOIN ".MAIN_DB_PREFIX.
"c_actioncomm as ca ON (a.fk_action=ca.id)
118 $sqlforconf =
$sql.
" AND ca.module='conference@eventorganization'";
122 $result = $db->query($sqlforconf);
124 while ($i < $db->num_rows($result)) {
125 $obj = $db->fetch_object($result);
126 if (!empty($obj->fk_soc)) {
127 $resultthirdparty = $tmpthirdparty->fetch($obj->fk_soc);
128 if ($resultthirdparty) {
129 $thirdpartyname = $tmpthirdparty->name;
131 $thirdpartyname =
'';
134 $thirdpartyname =
'';
137 $listOfConferences .=
'<tr><td>'.$obj->label.
'</td><td>'.$obj->label.
'</td><td>'.$thirdpartyname.
'</td><td>'.$obj->note.
'</td>';
138 $listOfConferences .=
'<td><button type="submit" name="vote" value="'.$obj->id.
'" class="button">'.$langs->trans(
"Vote").
'</button></td></tr>';
169 if (strlen($idvote)) {
170 if (in_array($hashedvote, $listofvotes)) {
176 $resultconforbooth = $conforbooth->fetch($idvote);
177 if ($resultconforbooth <= 0) {
179 $errmsg .= $conforbooth->error;
182 $conforbooth->num_vote++;
183 $resupdate = $conforbooth->update($user);
186 $_SESSION[
"savevotes"] = $hashedvote.
','.(empty($_SESSION[
"savevotes"]) ?
'' : $_SESSION[
"savevotes"]);
193 if ($votestatus ==
"ok") {
195 } elseif ($votestatus ==
"ko") {
197 } elseif ($votestatus ==
"err") {
200 header(
"Refresh:0;url=".
dol_buildpath(
'/public/project/viewandvote.php?id='.$id.
'&securekey=', 1).$securekeyreceived);
211 $head =
'<link rel="stylesheet" type="text/css" href="' .
getDolGlobalString(
'ONLINE_PAYMENT_CSS_URL').
'?lang='.$langs->defaultlang.
'">'.
"\n";
214 $conf->dol_hide_topmenu = 1;
215 $conf->dol_hide_leftmenu = 1;
217 $replacemainarea = (empty($conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
218 llxHeader($head, $langs->trans(
"SuggestForm"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea);
220 print
'<span id="dolpaymentspan"></span>'.
"\n";
221 print
'<div class="center">'.
"\n";
222 print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
223 print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
224 print
'<input type="hidden" name="action" value="dopayment">'.
"\n";
225 print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
227 print
'<input type="hidden" name="id" value="'.dol_escape_htmltag($id).
'">'.
"\n";
228 print
'<input type="hidden" name="securekey" value="'.dol_escape_htmltag($securekeyreceived).
'">'.
"\n";
229 print
'<input type="hidden" name="e" value="'.$entity.
'" />';
230 print
'<input type="hidden" name="forcesandbox" value="'.GETPOSTINT(
'forcesandbox').
'" />';
236 $logosmall = $mysoc->logo_small;
237 $logo = $mysoc->logo;
238 $paramlogo =
'ONLINE_PAYMENT_LOGO_'.$suffix;
239 if (!empty($conf->global->$paramlogo)) {
248 if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
249 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
250 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
251 } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$logo)) {
252 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
253 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
258 print
'<div class="backgreypublicpayment">';
259 print
'<div class="logopublicpayment">';
260 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
264 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>';
270 print
'<div class="backimagepublicsuggestbooth">';
271 print
'<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="' .
getDolGlobalString(
'PROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH').
'">';
275 print
'<table id="welcome" class="center">'.
"\n";
276 $text =
'<tr><td class="textpublicpayment"><br><strong>'.$langs->trans(
"EvntOrgRegistrationWelcomeMessage").
'</strong></td></tr>'.
"\n";
277 $text .=
'<tr><td class="textpublicpayment">'.$langs->trans(
"EvntOrgVoteHelpMessage").
' : "'.$project->title.
'".<br><br></td></tr>'.
"\n";
278 $text .=
'<tr><td class="textpublicpayment">'.$project->note_public.
'</td></tr>'.
"\n";
280 print
'</table>'.
"\n";
283 print
'<table cellpadding="10" id="conferences" border="1" class="center">'.
"\n";
284 print
'<th colspan="7">'.$langs->trans(
"ListOfSuggestedConferences").
'</th>';
285 print $listOfConferences.
'<br>';
286 print
'</table>'.
"\n";
if($user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage agenda events (actions)
Class to manage projects.
Class to manage third parties objects (customers, suppliers, prospects...)
htmlPrintOnlineFooter($fromcompany, $langs, $addformmessage=0, $suffix='', $object=null)
Show footer of company in HTML pages.
if(isModEnabled('invoice') && $user->hasRight('facture', 'lire')) if((isModEnabled('fournisseur') &&!getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') && $user->hasRight('don', 'lire')) if(isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) if(isModEnabled('invoice') &&isModEnabled('order') && $user->hasRight("commande", "lire") &&!getDolGlobalString('WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER')) $sql
Social contributions to pay.
setEventMessage($mesgs, $style='mesgs', $noduplicate=0)
Set event message in dol_events session object.
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.
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)
Returns a hash (non reversible encryption) of a string.