27 if (!defined(
'NOLOGIN')) {
30 if (!defined(
'NOCSRFCHECK')) {
31 define(
"NOCSRFCHECK", 1);
33 if (!defined(
'NOIPCHECK')) {
34 define(
'NOIPCHECK',
'1');
36 if (!defined(
'NOBROWSERNOTIF')) {
37 define(
'NOBROWSERNOTIF',
'1');
43 $entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
44 if (is_numeric($entity)) {
45 define(
"DOLENTITY", $entity);
49 require
'../../main.inc.php';
50 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
51 require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
52 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
53 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
54 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
57 $langs->loadLangs(array(
"main",
"other",
"dict",
"bills",
"companies",
"errors",
"members",
"paybox",
"propal",
"commercial"));
63 $action =
GETPOST(
'action',
'aZ09');
64 $cancel =
GETPOST(
'cancel',
'alpha');
65 $confirm =
GETPOST(
'confirm',
'alpha');
68 $refusepropal =
GETPOST(
'refusepropal',
'alpha');
69 $message =
GETPOST(
'message',
'aZ09');
78 $suffix =
GETPOST(
"suffix",
'aZ09');
79 $source =
GETPOST(
"source",
'alpha');
80 $ref = $REF =
GETPOST(
"ref",
'alpha');
88 if (!empty($refusepropal)) {
89 $action =
"refusepropal";
95 $urlwithroot = DOL_MAIN_URL_ROOT;
99 $SECUREKEY =
GETPOST(
"securekey");
101 if (!empty($source)) {
102 $urlok .=
'source='.urlencode($source).
'&';
103 $urlko .=
'source='.urlencode($source).
'&';
106 $urlok .=
'ref='.urlencode($REF).
'&';
107 $urlko .=
'ref='.urlencode($REF).
'&';
109 if (!empty($SECUREKEY)) {
110 $urlok .=
'securekey='.urlencode($SECUREKEY).
'&';
111 $urlko .=
'securekey='.urlencode($SECUREKEY).
'&';
113 if (!empty($entity)) {
114 $urlok .=
'entity='.urlencode($entity).
'&';
115 $urlko .=
'entity='.urlencode($entity).
'&';
117 $urlok = preg_replace(
'/&$/',
'', $urlok);
118 $urlko = preg_replace(
'/&$/',
'', $urlko);
120 $creditor = $mysoc->name;
125 if ($source && !$ref) {
132 if ($source ==
'proposal') {
134 } elseif ($source ==
'contract') {
136 } elseif ($source ==
'fichinter') {
139 if (!
dol_verifyHash($securekeyseed.$type.$ref.(isModEnabled(
'multicompany') ? $entity :
''), $SECUREKEY,
'0')) {
143 if ($source ==
'proposal') {
144 require_once DOL_DOCUMENT_ROOT.
'/comm/propal/class/propal.class.php';
145 $object =
new Propal($db);
146 $result= $object->fetch(0, $ref,
'', $entity);
147 } elseif ($source ==
'contract') {
148 require_once DOL_DOCUMENT_ROOT.
'/contrat/class/contrat.class.php';
150 $result= $object->fetch(0, $ref);
151 } elseif ($source ==
'fichinter') {
152 require_once DOL_DOCUMENT_ROOT.
'/fichinter/class/fichinter.class.php';
154 $result= $object->fetch(0, $ref);
164 if ($action ==
'confirm_refusepropal' && $confirm ==
'yes') {
167 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"propal";
168 $sql .=
" SET fk_statut = ".((int) $object::STATUS_NOTSIGNED).
", note_private = '".$db->escape($object->note_private).
"', date_signature='".$db->idate(
dol_now()).
"'";
169 $sql .=
" WHERE rowid = ".((int) $object->id);
172 $resql = $db->query($sql);
180 $message =
'refused';
182 if (method_exists($object,
'call_trigger')) {
184 $user =
new User($db);
185 $user->fetch($object->user_valid_id);
186 $object->context = array(
'closedfromonlinesignature' =>
'closedfromonlinesignature');
187 $result = $object->call_trigger(
'PROPAL_CLOSE_REFUSED', $user);
191 $result = $object->call_trigger(
'PROPAL_CLOSE_REFUSED_WEB', $user);
200 $object->fetch(0, $ref);
210 if (!empty($conf->global->MAIN_SIGN_CSS_URL)) {
211 $head =
'<link rel="stylesheet" type="text/css" href="'.$conf->global->MAIN_SIGN_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(
"OnlineSignature"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea, 1);
220 if ($action ==
'refusepropal') {
221 print
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?ref='.urlencode($ref).
'&securekey='.urlencode($SECUREKEY).(
isModEnabled(
'multicompany')?
'&entity='.$entity:
''), $langs->trans(
'RefusePropal'), $langs->trans(
'ConfirmRefusePropal', $object->ref),
'confirm_refusepropal',
'',
'', 1);
225 if (!empty($source) && in_array($ref, array(
'member_ref',
'contractline_ref',
'invoice_ref',
'order_ref',
'proposal_ref',
''))) {
226 $langs->load(
"errors");
227 dol_print_error_email(
'BADREFINONLINESIGNFORM', $langs->trans(
"ErrorBadLinkSourceSetButBadValueForRef", $source, $ref));
234 print
'<span id="dolpaymentspan"></span>'.
"\n";
235 print
'<div class="center">'.
"\n";
236 print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
237 print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
238 print
'<input type="hidden" name="action" value="dosign">'.
"\n";
239 print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
240 print
'<input type="hidden" name="suffix" value="'.GETPOST(
"suffix",
'alpha').
'">'.
"\n";
241 print
'<input type="hidden" name="securekey" value="'.$SECUREKEY.
'">'.
"\n";
242 print
'<input type="hidden" name="entity" value="'.$entity.
'" />';
243 print
'<input type="hidden" name="page_y" value="" />';
245 print
'<!-- Form to sign -->'.
"\n";
247 print
'<table id="dolpublictable" summary="Payment form" class="center">'.
"\n";
251 $logosmall = $mysoc->logo_small;
252 $logo = $mysoc->logo;
253 $paramlogo =
'ONLINE_SIGN_LOGO_'.$suffix;
254 if (!empty($conf->global->$paramlogo)) {
255 $logosmall = $conf->global->$paramlogo;
256 } elseif (!empty($conf->global->ONLINE_SIGN_LOGO)) {
257 $logosmall = $conf->global->ONLINE_SIGN_LOGO;
263 if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
264 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
265 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
266 } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$logo)) {
267 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
268 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
272 print
'<div class="backgreypublicpayment">';
273 print
'<div class="logopublicpayment">';
274 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'"';
277 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
278 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>';
282 if ($source ==
'proposal' && !empty($conf->global->PROPOSAL_IMAGE_PUBLIC_SIGN)) {
283 print
'<div class="backimagepublicproposalsign">';
284 print
'<img id="idPROPOSAL_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->PROPOSAL_IMAGE_PUBLIC_SIGN.
'">';
290 if (!empty($conf->global->ONLINE_SIGN_NEWFORM_TEXT)) {
292 if (preg_match(
'/^\((.*)\)$/', $conf->global->ONLINE_SIGN_NEWFORM_TEXT, $reg)) {
293 $text .= $langs->trans($reg[1]).
"<br>\n";
295 $text .= $conf->global->ONLINE_SIGN_NEWFORM_TEXT.
"<br>\n";
297 $text =
'<tr><td align="center"><br>'.$text.
'<br></td></tr>'.
"\n";
300 if ($source ==
'proposal') {
301 $text .=
'<tr><td class="textpublicpayment"><br><strong>'.$langs->trans(
"WelcomeOnOnlineSignaturePageProposal", $mysoc->name).
'</strong></td></tr>'.
"\n";
302 $text .=
'<tr><td class="textpublicpayment opacitymedium">'.$langs->trans(
"ThisScreenAllowsYouToSignDocFromProposal", $creditor).
'<br><br></td></tr>'.
"\n";
303 } elseif ($source ==
'contract') {
304 $text .=
'<tr><td class="textpublicpayment"><br><strong>'.$langs->trans(
"WelcomeOnOnlineSignaturePageContract", $mysoc->name).
'</strong></td></tr>'.
"\n";
305 $text .=
'<tr><td class="textpublicpayment opacitymedium">'.$langs->trans(
"ThisScreenAllowsYouToSignDocFromContract", $creditor).
'<br><br></td></tr>'.
"\n";
306 } elseif ($source ==
'fichinter') {
307 $text .=
'<tr><td class="textpublicpayment"><br><strong>'.$langs->trans(
"WelcomeOnOnlineSignaturePageFichinter", $mysoc->name).
'</strong></td></tr>'.
"\n";
308 $text .=
'<tr><td class="textpublicpayment opacitymedium">'.$langs->trans(
"ThisScreenAllowsYouToSignDocFromFichinter", $creditor).
'<br><br></td></tr>'.
"\n";
314 print
'<tr><td align="center">';
315 print
'<table with="100%" id="tablepublicpayment">';
316 if ($source ==
'proposal') {
317 print
'<tr><td align="left" colspan="2" class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnDocumentToSignProposal").
' :</td></tr>'.
"\n";
318 } elseif ($source ==
'contract') {
319 print
'<tr><td align="left" colspan="2" class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnDocumentToSignContract").
' :</td></tr>'.
"\n";
320 } elseif ($source ==
'fichinter') {
321 print
'<tr><td align="left" colspan="2" class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnDocumentToSignFichinter").
' :</td></tr>'.
"\n";
327 if ($source ==
'proposal') {
329 $langs->load(
"proposal");
331 $result = $object->fetch_thirdparty($object->socid);
334 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Creditor");
335 print
'</td><td class="CTableRow2">';
336 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
337 print
'<b>'.$creditor.
'</b>';
338 print
'<input type="hidden" name="creditor" value="'.$creditor.
'">';
339 print
'</td></tr>'.
"\n";
342 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"ThirdParty");
343 print
'</td><td class="CTableRow2">';
344 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
345 print
'<b>'.$object->thirdparty->name.
'</b>';
346 print
'</td></tr>'.
"\n";
349 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Amount");
350 print
'</td><td class="CTableRow2">';
351 print
'<b>'.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).
'</b>';
352 print
'</td></tr>'.
"\n";
355 $text =
'<b>'.$langs->trans(
"SignatureProposalRef", $object->ref).
'</b>';
356 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Designation");
357 print
'</td><td class="CTableRow2">'.$text;
359 $last_main_doc_file = $object->last_main_doc;
361 if ($object->status == $object::STATUS_VALIDATED) {
362 if (empty($last_main_doc_file) || !
dol_is_file(DOL_DATA_ROOT.
'/'.$object->last_main_doc)) {
365 $defaulttemplate =
'';
366 $object->generateDocument($defaulttemplate, $langs);
369 $directdownloadlink = $object->getLastMainDocLink(
'proposal');
370 if ($directdownloadlink) {
371 print
'<br><a href="'.$directdownloadlink.
'">';
372 print
img_mime($object->last_main_doc,
'');
373 print $langs->trans(
"DownloadDocument").
'</a>';
376 if ($object->status == $object::STATUS_NOTSIGNED) {
377 $directdownloadlink = $object->getLastMainDocLink(
'proposal');
378 if ($directdownloadlink) {
379 print
'<br><a href="'.$directdownloadlink.
'">';
380 print
img_mime($last_main_doc_file,
'');
381 print $langs->trans(
"DownloadDocument").
'</a>';
383 } elseif ($object->status == $object::STATUS_SIGNED || $object->status == $object::STATUS_BILLED) {
384 if (preg_match(
'/_signed-(\d+)/', $last_main_doc_file)) {
385 $last_main_doc_file_not_signed = preg_replace(
'/_signed-(\d+)/',
'', $last_main_doc_file);
388 $datefilenotsigned =
dol_filemtime($last_main_doc_file_not_signed);
390 if (empty($datefilenotsigned) || $datefilesigned > $datefilenotsigned) {
391 $directdownloadlink = $object->getLastMainDocLink(
'proposal');
392 if ($directdownloadlink) {
393 print
'<br><a href="'.$directdownloadlink.
'">';
394 print
img_mime($object->last_main_doc,
'');
395 print $langs->trans(
"DownloadDocument").
'</a>';
402 print
'<input type="hidden" name="source" value="'.GETPOST(
"source",
'alpha').
'">';
403 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
404 print
'</td></tr>'.
"\n";
405 } elseif ($source ==
'contract') {
407 $langs->load(
"contract");
409 $result = $object->fetch_thirdparty($object->socid);
412 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Proposer");
413 print
'</td><td class="CTableRow2">';
414 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
415 print
'<b>'.$creditor.
'</b>';
416 print
'<input type="hidden" name="creditor" value="'.$creditor.
'">';
417 print
'</td></tr>'.
"\n";
420 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"ThirdParty");
421 print
'</td><td class="CTableRow2">';
422 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
423 print
'<b>'.$object->thirdparty->name.
'</b>';
424 print
'</td></tr>'.
"\n";
427 $text =
'<b>'.$langs->trans(
"SignatureContractRef", $object->ref).
'</b>';
428 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Designation");
429 print
'</td><td class="CTableRow2">'.$text;
431 $last_main_doc_file = $object->last_main_doc;
433 if (empty($last_main_doc_file) || !
dol_is_file(DOL_DATA_ROOT.
'/'.$object->last_main_doc)) {
436 $defaulttemplate =
'';
437 $object->generateDocument($defaulttemplate, $langs);
440 $directdownloadlink = $object->getLastMainDocLink(
'contract');
441 if ($directdownloadlink) {
442 print
'<br><a href="'.$directdownloadlink.
'">';
443 print
img_mime($object->last_main_doc,
'');
444 if ($message ==
"signed") {
445 print $langs->trans(
"DownloadSignedDocument").
'</a>';
447 print $langs->trans(
"DownloadDocument").
'</a>';
452 print
'<input type="hidden" name="source" value="'.GETPOST(
"source",
'alpha').
'">';
453 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
454 print
'</td></tr>'.
"\n";
455 } elseif ($source ==
'fichinter') {
457 $langs->load(
"fichinter");
459 $result = $object->fetch_thirdparty($object->socid);
461 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Proposer");
462 print
'</td><td class="CTableRow2">';
463 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
464 print
'<b>'.$creditor.
'</b>';
465 print
'<input type="hidden" name="creditor" value="'.$creditor.
'">';
466 print
'</td></tr>'.
"\n";
469 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"ThirdParty");
470 print
'</td><td class="CTableRow2">';
471 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
472 print
'<b>'.$object->thirdparty->name.
'</b>';
473 print
'</td></tr>'.
"\n";
476 $text =
'<b>'.$langs->trans(
"SignatureFichinterRef", $object->ref).
'</b>';
477 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Designation");
478 print
'</td><td class="CTableRow2">'.$text;
480 $last_main_doc_file = $object->last_main_doc;
482 if (empty($last_main_doc_file) || !
dol_is_file(DOL_DATA_ROOT.
'/'.$object->last_main_doc)) {
485 $defaulttemplate =
'';
486 $object->generateDocument($defaulttemplate, $langs);
489 $directdownloadlink = $object->getLastMainDocLink(
'fichinter');
490 if ($directdownloadlink) {
491 print
'<br><a href="'.$directdownloadlink.
'">';
492 print
img_mime($object->last_main_doc,
'');
493 if ($message ==
"signed") {
494 print $langs->trans(
"DownloadSignedDocument").
'</a>';
496 print $langs->trans(
"DownloadDocument").
'</a>';
501 print
'<input type="hidden" name="source" value="'.GETPOST(
"source",
'alpha').
'">';
502 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
503 print
'</td></tr>'.
"\n";
507 if (!$found && !$mesg) {
508 $mesg = $langs->transnoentitiesnoconv(
"ErrorBadParameters");
512 print
'<tr><td class="center" colspan="2"><br><div class="warning">'.dol_escape_htmltag($mesg).
'</div></td></tr>'.
"\n";
515 print
'</table>'.
"\n";
518 if ($action !=
'dosign') {
519 if ($found && !$error) {
528 print
'</td></tr>'.
"\n";
529 print
'<tr><td class="center">';
532 if ($action ==
"dosign" && empty($cancel)) {
533 print
'<div class="tablepublicpayment">';
534 print
'<input type="button" class="buttonDelete small" id="clearsignature" value="'.$langs->trans(
"ClearSignature").
'">';
535 print
'<div id="signature" style="border:solid;"></div>';
538 print
'<input type="button" class="button" id="signbutton" value="'.$langs->trans(
"Sign").
'">';
539 print
'<input type="submit" class="button" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
542 print
'<script language="JavaScript" type="text/javascript" src="'.DOL_URL_ROOT.
'/includes/jquery/plugins/jSignature/jSignature.js"></script>
543 <script type="text/javascript">
544 $(document).ready(function() {
545 $("#signature").jSignature({ color:"#000", lineWidth:4, '.(empty($conf->dol_optimize_smallscreen) ?
'' :
'width: 280, ' ).
'height: 180});
547 $("#signature").on("change",function(){
548 $("#clearsignature").css("display","");
549 $("#signbutton").attr("disabled",false);
550 if(!$._data($("#signbutton")[0], "events")){
551 $("#signbutton").on("click",function(){
552 var signature = $("#signature").jSignature("getData", "image");
555 url: "'.DOL_URL_ROOT.
'/core/ajax/onlineSign.php",
558 "action" : "importSignature",
560 "signaturebase64" : signature,
561 "ref" : \
''.dol_escape_js($REF).
'\',
562 "securekey" : \
''.dol_escape_js($SECUREKEY).
'\',
563 "mode" : \
''.dol_escape_htmltag($source).
'\',
564 "entity" : \
''.dol_escape_htmltag($entity).
'\',
566 success:
function(response) {
567 if(response ==
"success"){
568 console.log(
"Success on saving signature");
569 window.location.replace(
"'.$_SERVER["PHP_SELF
"].'?ref='.urlencode($ref).'&source='.urlencode($source).'&message=signed&securekey='.urlencode($SECUREKEY).(isModEnabled('multicompany')?'&entity='.$entity:'').'");
571 console.error(response);
579 $(
"#clearsignature").on(
"click",
function(){
580 $(
"#signature").jSignature(
"clear");
581 $(
"#signbutton").attr(
"disabled",
true);
584 $(
"#signbutton").attr(
"disabled",
true);
588 if ($source == 'proposal
') {
589 if ($object->status == $object::STATUS_SIGNED) {
591 if ($message == 'signed') {
592 print '<span
class=
"ok">
'.$langs->trans("PropalSigned").'</span>
';
594 print '<span
class=
"ok">
'.$langs->trans("PropalAlreadySigned").'</span>
';
596 } elseif ($object->status == $object::STATUS_NOTSIGNED) {
598 if ($message == 'refused
') {
599 print '<span
class=
"ok">
'.$langs->trans("PropalRefused").'</span>
';
601 print '<span
class=
"warning">
'.$langs->trans("PropalAlreadyRefused").'</span>
';
604 print '<input
type=
"submit" class=
"butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value=
"'.$langs->trans("SignPropal
").'">
';
605 print '<input
name=
"refusepropal" type=
"submit" class=
"butActionDelete small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value=
"'.$langs->trans("RefusePropal
").'">
';
607 } elseif ($source == 'contract
') {
608 if ($message == 'signed') {
609 print '<span
class=
"ok">
'.$langs->trans("ContractSigned").'</span>
';
611 print '<input
type=
"submit" class=
"butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value=
"'.$langs->trans("SignContract
").'">
';
613 } elseif ($source == 'fichinter
') {
614 if ($message == 'signed') {
615 print '<span
class=
"ok">
'.$langs->trans("FichinterSigned").'</span>
';
617 print '<input
type=
"submit" class=
"butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value=
"'.$langs->trans("SignFichinter
").'">
';
621 print '</td></tr>
'."\n";
622 print '</table>
'."\n";
623 print '</form>
'."\n";
628 htmlPrintOnlinePaymentFooter($mysoc, $langs);
630 llxFooter('', 'public');
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage contracts.
Class to manage interventions.
Class to manage proposals.
Class to manage Dolibarr users.
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_filemtime($pathoffile)
Return time of a file.
dol_is_file($pathoffile)
Return if path is a file.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
dol_now($mode='auto')
Return date for now.
img_mime($file, $titlealt='', $morecss='')
Show MIME img of a file.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error_email($prefixcode, $errormessage='', $errormessages=array(), $morecss='error', $email='')
Show a public email and error code to contact if technical error.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
$conf db name
Only used if Module[ID]Name translation string is not found.
dol_verifyHash($chain, $hash, $type='0')
Compute a hash and compare it to the given one For backward compatibility reasons,...
httponly_accessforbidden($message=1, $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.