26if (!defined(
'NOLOGIN')) {
29if (!defined(
'NOCSRFCHECK')) {
30 define(
"NOCSRFCHECK", 1);
32if (!defined(
'NOIPCHECK')) {
33 define(
'NOIPCHECK',
'1');
35if (!defined(
'NOBROWSERNOTIF')) {
36 define(
'NOBROWSERNOTIF',
'1');
42$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))));
43if (is_numeric($entity)) {
44 define(
"DOLENTITY", $entity);
48require
'../../main.inc.php';
49require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
50require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
51require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
52require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
53require_once DOL_DOCUMENT_ROOT.
'/societe/class/societeaccount.class.php';
54require_once DOL_DOCUMENT_ROOT.
'/compta/facture/class/facture.class.php';
55require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
56require_once DOL_DOCUMENT_ROOT .
'/comm/action/class/actioncomm.class.php';
70$hookmanager->initHooks(array(
'newpayment'));
76$langs->loadLangs(array(
"main",
"other",
"dict",
"bills",
"companies",
"errors",
"paypal",
"stripe"));
83$action =
GETPOST(
'action',
'aZ09');
85$securekeyreceived =
GETPOST(
"securekey");
88if ($securekeytocompare != $securekeyreceived) {
89 print $langs->trans(
'MissingOrBadSecureKey');
93$listofvotes = explode(
',', $_SESSION[
"savevotes"]);
99$urlwithroot = DOL_MAIN_URL_ROOT;
102$resultproject = $project->fetch((
int) $id);
103if ($resultproject < 0) {
105 $errmsg .= $project->error;
120$listOfConferences =
'<tr><td>'.$langs->trans(
'Label').
'</td>';
121$listOfConferences .=
'<td>'.$langs->trans(
'Type').
'</td>';
122$listOfConferences .=
'<td>'.$langs->trans(
'ThirdParty').
'</td>';
123$listOfConferences .=
'<td>'.$langs->trans(
'Note').
'</td></tr>';
125$sql =
"SELECT a.id, a.fk_action, a.datep, a.datep2, a.label, a.fk_soc, a.note, ca.libelle as label
126 FROM ".MAIN_DB_PREFIX.
"actioncomm as a
127 INNER JOIN ".MAIN_DB_PREFIX.
"c_actioncomm as ca ON (a.fk_action = ca.id)
130$sqlforconf = $sql.
" AND ca.module='conference@eventorganization'";
134$result =
$db->query($sqlforconf);
136while ($i < $db->num_rows($result)) {
137 $obj =
$db->fetch_object($result);
138 if (!empty($obj->fk_soc)) {
139 $resultthirdparty = $tmpthirdparty->fetch($obj->fk_soc);
140 if ($resultthirdparty) {
141 $thirdpartyname = $tmpthirdparty->name;
143 $thirdpartyname =
'';
146 $thirdpartyname =
'';
149 $listOfConferences .=
'<tr><td>'.$obj->label.
'</td><td>'.$obj->label.
'</td><td>'.$thirdpartyname.
'</td><td>'.$obj->note.
'</td>';
150 $listOfConferences .=
'<td><button type="submit" name="vote" value="'.$obj->id.
'" class="button">'.$langs->trans(
"Vote").
'</button></td></tr>';
186 if (in_array($hashedvote, $listofvotes)) {
192 $resultconforbooth = $conforbooth->fetch($idvote);
193 if ($resultconforbooth <= 0) {
195 $errmsg .= $conforbooth->error;
198 $conforbooth->num_vote++;
199 $resupdate = $conforbooth->update($user);
202 $_SESSION[
"savevotes"] = $hashedvote.
','.(empty($_SESSION[
"savevotes"]) ?
'' : $_SESSION[
"savevotes"]);
209 if ($votestatus ==
"ok") {
211 } elseif ($votestatus ==
"ko") {
213 } elseif ($votestatus ==
"err") {
216 header(
"Refresh:0;url=".
dol_buildpath(
'/public/project/viewandvote.php?id='.
$id.
'&securekey=', 1).$securekeyreceived);
227 $head =
'<link rel="stylesheet" type="text/css" href="' .
getDolGlobalString(
'ONLINE_PAYMENT_CSS_URL').
'?lang='.$langs->defaultlang.
'">'.
"\n";
230$conf->dol_hide_topmenu = 1;
231$conf->dol_hide_leftmenu = 1;
233$replacemainarea = (empty(
$conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
234llxHeader($head, $langs->trans(
"SuggestForm"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea);
236print
'<span id="dolpaymentspan"></span>'.
"\n";
237print
'<div class="center">'.
"\n";
238print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
239print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
240print
'<input type="hidden" name="action" value="dopayment">'.
"\n";
241print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
243print
'<input type="hidden" name="id" value="'.dol_escape_htmltag($id).
'">'.
"\n";
244print
'<input type="hidden" name="securekey" value="'.dol_escape_htmltag($securekeyreceived).
'">'.
"\n";
245print
'<input type="hidden" name="e" value="'.$entity.
'" />';
252$logosmall =
$mysoc->logo_small;
254$paramlogo =
'ONLINE_PAYMENT_LOGO_'.$suffix;
264if (!empty($logosmall) && is_readable(
$conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
265 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
266 $urllogofull =
$dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
267} elseif (!empty($logo) && is_readable(
$conf->mycompany->dir_output.
'/logos/'.$logo)) {
268 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
274 print
'<div class="backgreypublicpayment">';
275 print
'<div class="logopublicpayment">';
276 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
280 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>';
286 print
'<div class="backimagepublicsuggestbooth">';
287 print
'<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="' .
getDolGlobalString(
'PROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH').
'">';
291print
'<table id="welcome" class="center">'.
"\n";
292$text =
'<tr><td class="textpublicpayment"><br><strong>'.$langs->trans(
"EvntOrgRegistrationWelcomeMessage").
'</strong></td></tr>'.
"\n";
293$text .=
'<tr><td class="textpublicpayment">'.$langs->trans(
"EvntOrgVoteHelpMessage").
' : "'.
dol_escape_htmltag($project->title).
'".<br><br></td></tr>'.
"\n";
294$text .=
'<tr><td class="textpublicpayment">'.dol_htmlentitiesbr($project->note_public).
'</td></tr>'.
"\n";
296print
'</table>'.
"\n";
299print
'<table cellpadding="10" id="conferences" border="1" class="center">'.
"\n";
300print
'<th colspan="7">'.$langs->trans(
"ListOfSuggestedConferences").
'</th>';
301print $listOfConferences.
'<br>';
302print
'</table>'.
"\n";
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
global $dolibarr_main_url_root
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
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 public pages.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
isModEnabled($module)
Is Dolibarr module enabled.
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...
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.