25if (!defined(
'NOLOGIN')) {
28if (!defined(
'NOCSRFCHECK')) {
29 define(
"NOCSRFCHECK", 1);
31if (!defined(
'NOIPCHECK')) {
32 define(
'NOIPCHECK',
'1');
34if (!defined(
'NOBROWSERNOTIF')) {
35 define(
'NOBROWSERNOTIF',
'1');
41$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))));
42if (is_numeric($entity)) {
43 define(
"DOLENTITY", $entity);
47require
'../../main.inc.php';
48require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
49require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
50require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
51require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
52require_once DOL_DOCUMENT_ROOT.
'/societe/class/societeaccount.class.php';
53require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
54require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
55require_once DOL_DOCUMENT_ROOT .
'/comm/action/class/actioncomm.class.php';
68$hookmanager->initHooks(array(
'newpayment'));
71global $dolibarr_main_url_root;
74$langs->loadLangs(array(
"main",
"other",
"dict",
"bills",
"companies",
"errors",
"paybox",
"paypal",
"stripe"));
81$action =
GETPOST(
'action',
'aZ09');
83$securekeyreceived =
GETPOST(
"securekey");
86if ($securekeytocompare != $securekeyreceived) {
87 print $langs->trans(
'MissingOrBadSecureKey');
91$listofvotes = explode(
',', $_SESSION[
"savevotes"]);
97$urlwithroot = DOL_MAIN_URL_ROOT;
100$resultproject = $project->fetch($id);
101if ($resultproject < 0) {
103 $errmsg .= $project->error;
107if (empty(
$conf->eventorganization->enabled)) {
116$tmpthirdparty =
new Societe($db);
118$listOfConferences =
'<tr><td>'.$langs->trans(
'Label').
'</td>';
119$listOfConferences .=
'<td>'.$langs->trans(
'Type').
'</td>';
120$listOfConferences .=
'<td>'.$langs->trans(
'ThirdParty').
'</td>';
121$listOfConferences .=
'<td>'.$langs->trans(
'Note').
'</td></tr>';
123$sql =
"SELECT a.id, a.fk_action, a.datep, a.datep2, a.label, a.fk_soc, a.note, ca.libelle as label
124 FROM ".MAIN_DB_PREFIX.
"actioncomm as a
125 INNER JOIN ".MAIN_DB_PREFIX.
"c_actioncomm as ca ON (a.fk_action=ca.id)
128$sqlforconf = $sql.
" AND ca.module='conference@eventorganization'";
132$result = $db->query($sqlforconf);
134while ($i < $db->num_rows($result)) {
135 $obj = $db->fetch_object($result);
136 if (!empty($obj->fk_soc)) {
137 $resultthirdparty = $tmpthirdparty->fetch($obj->fk_soc);
138 if ($resultthirdparty) {
139 $thirdpartyname = $tmpthirdparty->name;
141 $thirdpartyname =
'';
144 $thirdpartyname =
'';
147 $listOfConferences .=
'<tr><td>'.$obj->label.
'</td><td>'.$obj->label.
'</td><td>'.$thirdpartyname.
'</td><td>'.$obj->note.
'</td>';
148 $listOfConferences .=
'<td><button type="submit" name="vote" value="'.$obj->id.
'" class="button">'.$langs->trans(
"Vote").
'</button></td></tr>';
179if (strlen($idvote)) {
180 if (in_array($hashedvote, $listofvotes)) {
186 $resultconforbooth = $conforbooth->fetch($idvote);
187 if ($resultconforbooth <= 0) {
189 $errmsg .= $conforbooth->error;
192 $conforbooth->num_vote++;
193 $resupdate = $conforbooth->update($user);
196 $_SESSION[
"savevotes"] = $hashedvote.
','.(empty($_SESSION[
"savevotes"]) ?
'' : $_SESSION[
"savevotes"]);
203 if ($votestatus ==
"ok") {
205 } elseif ($votestatus ==
"ko") {
207 } elseif ($votestatus ==
"err") {
210 header(
"Refresh:0;url=".
dol_buildpath(
'/public/project/viewandvote.php?id='.
$id.
'&securekey=', 1).$securekeyreceived);
221 $head =
'<link rel="stylesheet" type="text/css" href="' .
getDolGlobalString(
'ONLINE_PAYMENT_CSS_URL').
'?lang='.$langs->defaultlang.
'">'.
"\n";
224$conf->dol_hide_topmenu = 1;
225$conf->dol_hide_leftmenu = 1;
227$replacemainarea = (empty(
$conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
228llxHeader($head, $langs->trans(
"SuggestForm"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea);
230print
'<span id="dolpaymentspan"></span>'.
"\n";
231print
'<div class="center">'.
"\n";
232print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
233print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
234print
'<input type="hidden" name="action" value="dopayment">'.
"\n";
235print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
237print
'<input type="hidden" name="id" value="'.dol_escape_htmltag($id).
'">'.
"\n";
238print
'<input type="hidden" name="securekey" value="'.dol_escape_htmltag($securekeyreceived).
'">'.
"\n";
239print
'<input type="hidden" name="e" value="'.$entity.
'" />';
240print
'<input type="hidden" name="forcesandbox" value="'.GETPOSTINT(
'forcesandbox').
'" />';
246$logosmall = $mysoc->logo_small;
248$paramlogo =
'ONLINE_PAYMENT_LOGO_'.$suffix;
258if (!empty($logosmall) && is_readable(
$conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
259 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
260 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
261} elseif (!empty($logo) && is_readable(
$conf->mycompany->dir_output.
'/logos/'.$logo)) {
262 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
263 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
268 print
'<div class="backgreypublicpayment">';
269 print
'<div class="logopublicpayment">';
270 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
274 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>';
280 print
'<div class="backimagepublicsuggestbooth">';
281 print
'<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="' .
getDolGlobalString(
'PROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH').
'">';
285print
'<table id="welcome" class="center">'.
"\n";
286$text =
'<tr><td class="textpublicpayment"><br><strong>'.$langs->trans(
"EvntOrgRegistrationWelcomeMessage").
'</strong></td></tr>'.
"\n";
287$text .=
'<tr><td class="textpublicpayment">'.$langs->trans(
"EvntOrgVoteHelpMessage").
' : "'.
dol_escape_htmltag($project->title).
'".<br><br></td></tr>'.
"\n";
288$text .=
'<tr><td class="textpublicpayment">'.dol_htmlentitiesbr($project->note_public).
'</td></tr>'.
"\n";
290print
'</table>'.
"\n";
293print
'<table cellpadding="10" id="conferences" border="1" class="center">'.
"\n";
294print
'<th colspan="7">'.$langs->trans(
"ListOfSuggestedConferences").
'</th>';
295print $listOfConferences.
'<br>';
296print
'</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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
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.
setEventMessage($mesgs, $style='mesgs', $noduplicate=0, $attop=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 a Dolibarr global constant string value.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
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.