28 if (!defined(
'NOLOGIN')) {
31 if (!defined(
'NOCSRFCHECK')) {
32 define(
"NOCSRFCHECK", 1);
34 if (!defined(
'NOIPCHECK')) {
35 define(
'NOIPCHECK',
'1');
37 if (!defined(
'NOBROWSERNOTIF')) {
38 define(
'NOBROWSERNOTIF',
'1');
44 $entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
45 if (is_numeric($entity)) {
46 define(
"DOLENTITY", $entity);
50 require
'../../main.inc.php';
51 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
52 require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
53 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
54 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
55 require_once DOL_DOCUMENT_ROOT.
'/product/class/product.class.php';
58 $langs->loadLangs(array(
"main",
"other",
"dict",
"bills",
"companies",
"errors",
"members",
"paybox",
"propal",
"commercial"));
64 $action =
GETPOST(
'action',
'aZ09');
65 $cancel =
GETPOST(
'cancel',
'alpha');
66 $confirm =
GETPOST(
'confirm',
'alpha');
69 $refusepropal =
GETPOST(
'refusepropal',
'alpha');
70 $message =
GETPOST(
'message',
'aZ09');
79 $suffix =
GETPOST(
"suffix",
'aZ09');
80 $source =
GETPOST(
"source",
'alpha');
81 $ref = $REF =
GETPOST(
"ref",
'alpha');
89 if (!empty($refusepropal)) {
90 $action =
"refusepropal";
96 $urlwithroot = DOL_MAIN_URL_ROOT;
100 $SECUREKEY =
GETPOST(
"securekey");
102 if (!empty($source)) {
103 $urlok .=
'source='.urlencode($source).
'&';
104 $urlko .=
'source='.urlencode($source).
'&';
107 $urlok .=
'ref='.urlencode($REF).
'&';
108 $urlko .=
'ref='.urlencode($REF).
'&';
110 if (!empty($SECUREKEY)) {
111 $urlok .=
'securekey='.urlencode($SECUREKEY).
'&';
112 $urlko .=
'securekey='.urlencode($SECUREKEY).
'&';
114 if (!empty($entity)) {
115 $urlok .=
'entity='.urlencode($entity).
'&';
116 $urlko .=
'entity='.urlencode($entity).
'&';
118 $urlok = preg_replace(
'/&$/',
'', $urlok);
119 $urlko = preg_replace(
'/&$/',
'', $urlko);
121 $creditor = $mysoc->name;
126 if ($source && !$ref) {
133 if ($source ==
'proposal') {
135 } elseif ($source ==
'contract') {
137 } elseif ($source ==
'fichinter') {
140 if (!
dol_verifyHash($securekeyseed.$type.$ref.(isModEnabled(
'multicompany') ? $entity :
''), $SECUREKEY,
'0')) {
144 if ($source ==
'proposal') {
145 require_once DOL_DOCUMENT_ROOT.
'/comm/propal/class/propal.class.php';
146 $object =
new Propal($db);
147 $result= $object->fetch(0, $ref,
'', $entity);
148 } elseif ($source ==
'contract') {
149 require_once DOL_DOCUMENT_ROOT.
'/contrat/class/contrat.class.php';
151 $result= $object->fetch(0, $ref);
152 } elseif ($source ==
'fichinter') {
153 require_once DOL_DOCUMENT_ROOT.
'/fichinter/class/fichinter.class.php';
155 $result= $object->fetch(0, $ref);
161 $hookmanager->initHooks(array(
'onlinesign'));
170 if ($action ==
'confirm_refusepropal' && $confirm ==
'yes') {
173 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"propal";
174 $sql .=
" SET fk_statut = ".((int) $object::STATUS_NOTSIGNED).
", note_private = '".$db->escape($object->note_private).
"', date_signature='".$db->idate(
dol_now()).
"'";
175 $sql .=
" WHERE rowid = ".((int) $object->id);
178 $resql = $db->query(
$sql);
186 $message =
'refused';
188 if (method_exists($object,
'call_trigger')) {
190 $user =
new User($db);
191 $user->fetch($object->user_valid_id);
192 $object->context = array(
'closedfromonlinesignature' =>
'closedfromonlinesignature');
193 $result = $object->call_trigger(
'PROPAL_CLOSE_REFUSED', $user);
202 $object->fetch(0, $ref);
212 if (!empty($conf->global->MAIN_SIGN_CSS_URL)) {
213 $head =
'<link rel="stylesheet" type="text/css" href="'.$conf->global->MAIN_SIGN_CSS_URL.
'?lang='.$langs->defaultlang.
'">'.
"\n";
216 $conf->dol_hide_topmenu = 1;
217 $conf->dol_hide_leftmenu = 1;
219 $replacemainarea = (empty($conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
220 llxHeader($head, $langs->trans(
"OnlineSignature"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea, 1);
222 if ($action ==
'refusepropal') {
223 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);
227 if (!empty($source) && in_array($ref, array(
'member_ref',
'contractline_ref',
'invoice_ref',
'order_ref',
'proposal_ref',
''))) {
228 $langs->load(
"errors");
229 dol_print_error_email(
'BADREFINONLINESIGNFORM', $langs->trans(
"ErrorBadLinkSourceSetButBadValueForRef", $source, $ref));
236 print
'<span id="dolpaymentspan"></span>'.
"\n";
237 print
'<div class="center">'.
"\n";
238 print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
239 print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
240 print
'<input type="hidden" name="action" value="dosign">'.
"\n";
241 print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
242 print
'<input type="hidden" name="suffix" value="'.GETPOST(
"suffix",
'alpha').
'">'.
"\n";
243 print
'<input type="hidden" name="securekey" value="'.$SECUREKEY.
'">'.
"\n";
244 print
'<input type="hidden" name="entity" value="'.$entity.
'" />';
245 print
'<input type="hidden" name="page_y" value="" />';
247 print
'<!-- Form to sign -->'.
"\n";
249 print
'<table id="dolpublictable" summary="Payment form" class="center">'.
"\n";
253 $logosmall = $mysoc->logo_small;
254 $logo = $mysoc->logo;
255 $paramlogo =
'ONLINE_SIGN_LOGO_'.$suffix;
256 if (!empty($conf->global->$paramlogo)) {
257 $logosmall = $conf->global->$paramlogo;
258 } elseif (!empty($conf->global->ONLINE_SIGN_LOGO)) {
259 $logosmall = $conf->global->ONLINE_SIGN_LOGO;
265 if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
266 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
267 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
268 } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$logo)) {
269 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
270 $urllogofull = $dolibarr_main_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.
'"';
279 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
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>';
284 if ($source ==
'proposal' && !empty($conf->global->PROPOSAL_IMAGE_PUBLIC_SIGN)) {
285 print
'<div class="backimagepublicproposalsign">';
286 print
'<img id="idPROPOSAL_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->PROPOSAL_IMAGE_PUBLIC_SIGN.
'">';
292 if (!empty($conf->global->ONLINE_SIGN_NEWFORM_TEXT)) {
294 if (preg_match(
'/^\((.*)\)$/', $conf->global->ONLINE_SIGN_NEWFORM_TEXT, $reg)) {
295 $text .= $langs->trans($reg[1]).
"<br>\n";
297 $text .= $conf->global->ONLINE_SIGN_NEWFORM_TEXT.
"<br>\n";
299 $text =
'<tr><td align="center"><br>'.$text.
'<br></td></tr>'.
"\n";
302 if ($source ==
'proposal') {
303 $text .=
'<tr><td class="textpublicpayment"><br><strong>'.$langs->trans(
"WelcomeOnOnlineSignaturePageProposal", $mysoc->name).
'</strong></td></tr>'.
"\n";
304 $text .=
'<tr><td class="textpublicpayment opacitymedium">'.$langs->trans(
"ThisScreenAllowsYouToSignDocFromProposal", $creditor).
'<br><br></td></tr>'.
"\n";
305 } elseif ($source ==
'contract') {
306 $text .=
'<tr><td class="textpublicpayment"><br><strong>'.$langs->trans(
"WelcomeOnOnlineSignaturePageContract", $mysoc->name).
'</strong></td></tr>'.
"\n";
307 $text .=
'<tr><td class="textpublicpayment opacitymedium">'.$langs->trans(
"ThisScreenAllowsYouToSignDocFromContract", $creditor).
'<br><br></td></tr>'.
"\n";
308 } elseif ($source ==
'fichinter') {
309 $text .=
'<tr><td class="textpublicpayment"><br><strong>'.$langs->trans(
"WelcomeOnOnlineSignaturePageFichinter", $mysoc->name).
'</strong></td></tr>'.
"\n";
310 $text .=
'<tr><td class="textpublicpayment opacitymedium">'.$langs->trans(
"ThisScreenAllowsYouToSignDocFromFichinter", $creditor).
'<br><br></td></tr>'.
"\n";
316 print
'<tr><td align="center">';
317 print
'<table with="100%" id="tablepublicpayment">';
318 if ($source ==
'proposal') {
319 print
'<tr><td align="left" colspan="2" class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnDocumentToSignProposal").
' :</td></tr>'.
"\n";
320 } elseif ($source ==
'contract') {
321 print
'<tr><td align="left" colspan="2" class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnDocumentToSignContract").
' :</td></tr>'.
"\n";
322 } elseif ($source ==
'fichinter') {
323 print
'<tr><td align="left" colspan="2" class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnDocumentToSignFichinter").
' :</td></tr>'.
"\n";
329 if ($source ==
'proposal') {
331 $langs->load(
"proposal");
333 $result = $object->fetch_thirdparty($object->socid);
336 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Creditor");
337 print
'</td><td class="CTableRow2">';
338 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
339 print
'<b>'.$creditor.
'</b>';
340 print
'<input type="hidden" name="creditor" value="'.$creditor.
'">';
341 print
'</td></tr>'.
"\n";
344 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"ThirdParty");
345 print
'</td><td class="CTableRow2">';
346 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
347 print
'<b>'.$object->thirdparty->name.
'</b>';
348 print
'</td></tr>'.
"\n";
351 $amount =
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Amount");
352 $amount .=
'</td><td class="CTableRow2">';
353 $amount .=
'<b>'.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).
'</b>';
354 $amount .=
'</td></tr>'.
"\n";
357 $parameters = array(
'source' => $source);
358 $reshook = $hookmanager->executeHooks(
'amountPropalSign', $parameters, $object, $action);
359 if (empty($reshook)) {
360 $amount .= $hookmanager->resPrint;
361 } elseif ($reshook > 0) {
362 $amount = $hookmanager->resPrint;
368 $text =
'<b>'.$langs->trans(
"SignatureProposalRef", $object->ref).
'</b>';
369 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Designation");
370 print
'</td><td class="CTableRow2">'.$text;
372 $last_main_doc_file = $object->last_main_doc;
374 if ($object->status == $object::STATUS_VALIDATED) {
375 if (empty($last_main_doc_file) || !
dol_is_file(DOL_DATA_ROOT.
'/'.$object->last_main_doc)) {
378 $defaulttemplate =
'';
379 $object->generateDocument($defaulttemplate, $langs);
382 $directdownloadlink = $object->getLastMainDocLink(
'proposal');
383 if ($directdownloadlink) {
384 print
'<br><a href="'.$directdownloadlink.
'">';
385 print
img_mime($object->last_main_doc,
'');
386 print $langs->trans(
"DownloadDocument").
'</a>';
389 if ($object->status == $object::STATUS_NOTSIGNED) {
390 $directdownloadlink = $object->getLastMainDocLink(
'proposal');
391 if ($directdownloadlink) {
392 print
'<br><a href="'.$directdownloadlink.
'">';
393 print
img_mime($last_main_doc_file,
'');
394 print $langs->trans(
"DownloadDocument").
'</a>';
396 } elseif ($object->status == $object::STATUS_SIGNED || $object->status == $object::STATUS_BILLED) {
397 if (preg_match(
'/_signed-(\d+)/', $last_main_doc_file)) {
398 $last_main_doc_file_not_signed = preg_replace(
'/_signed-(\d+)/',
'', $last_main_doc_file);
401 $datefilenotsigned =
dol_filemtime($last_main_doc_file_not_signed);
403 if (empty($datefilenotsigned) || $datefilesigned > $datefilenotsigned) {
404 $directdownloadlink = $object->getLastMainDocLink(
'proposal');
405 if ($directdownloadlink) {
406 print
'<br><a href="'.$directdownloadlink.
'">';
407 print
img_mime($object->last_main_doc,
'');
408 print $langs->trans(
"DownloadDocument").
'</a>';
415 print
'<input type="hidden" name="source" value="'.GETPOST(
"source",
'alpha').
'">';
416 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
417 print
'</td></tr>'.
"\n";
418 } elseif ($source ==
'contract') {
420 $langs->load(
"contract");
422 $result = $object->fetch_thirdparty($object->socid);
425 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Proposer");
426 print
'</td><td class="CTableRow2">';
427 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
428 print
'<b>'.$creditor.
'</b>';
429 print
'<input type="hidden" name="creditor" value="'.$creditor.
'">';
430 print
'</td></tr>'.
"\n";
433 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"ThirdParty");
434 print
'</td><td class="CTableRow2">';
435 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
436 print
'<b>'.$object->thirdparty->name.
'</b>';
437 print
'</td></tr>'.
"\n";
440 $text =
'<b>'.$langs->trans(
"SignatureContractRef", $object->ref).
'</b>';
441 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Designation");
442 print
'</td><td class="CTableRow2">'.$text;
444 $last_main_doc_file = $object->last_main_doc;
446 if (empty($last_main_doc_file) || !
dol_is_file(DOL_DATA_ROOT.
'/'.$object->last_main_doc)) {
449 $defaulttemplate =
'';
450 $object->generateDocument($defaulttemplate, $langs);
453 $directdownloadlink = $object->getLastMainDocLink(
'contract');
454 if ($directdownloadlink) {
455 print
'<br><a href="'.$directdownloadlink.
'">';
456 print
img_mime($object->last_main_doc,
'');
457 if ($message ==
"signed") {
458 print $langs->trans(
"DownloadSignedDocument").
'</a>';
460 print $langs->trans(
"DownloadDocument").
'</a>';
465 print
'<input type="hidden" name="source" value="'.GETPOST(
"source",
'alpha').
'">';
466 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
467 print
'</td></tr>'.
"\n";
468 } elseif ($source ==
'fichinter') {
470 $langs->load(
"fichinter");
472 $result = $object->fetch_thirdparty($object->socid);
475 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Proposer");
476 print
'</td><td class="CTableRow2">';
477 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
478 print
'<b>'.$creditor.
'</b>';
479 print
'<input type="hidden" name="creditor" value="'.$creditor.
'">';
480 print
'</td></tr>'.
"\n";
483 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"ThirdParty");
484 print
'</td><td class="CTableRow2">';
485 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
486 print
'<b>'.$object->thirdparty->name.
'</b>';
487 print
'</td></tr>'.
"\n";
490 $text =
'<b>'.$langs->trans(
"SignatureFichinterRef", $object->ref).
'</b>';
491 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Designation");
492 print
'</td><td class="CTableRow2">'.$text;
494 $last_main_doc_file = $object->last_main_doc;
496 if (empty($last_main_doc_file) || !
dol_is_file(DOL_DATA_ROOT.
'/'.$object->last_main_doc)) {
499 $defaulttemplate =
'';
500 $object->generateDocument($defaulttemplate, $langs);
503 $directdownloadlink = $object->getLastMainDocLink(
'fichinter');
504 if ($directdownloadlink) {
505 print
'<br><a href="'.$directdownloadlink.
'">';
506 print
img_mime($object->last_main_doc,
'');
507 if ($message ==
"signed") {
508 print $langs->trans(
"DownloadSignedDocument").
'</a>';
510 print $langs->trans(
"DownloadDocument").
'</a>';
513 print
'<input type="hidden" name="source" value="'.GETPOST(
"source",
'alpha').
'">';
514 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
515 print
'</td></tr>'.
"\n";
519 $parameters = array(
'source' => $source);
520 $reshook = $hookmanager->executeHooks(
'addFormSign', $parameters, $object, $action);
522 if (!$found && !$mesg) {
523 $mesg = $langs->transnoentitiesnoconv(
"ErrorBadParameters");
527 print
'<tr><td class="center" colspan="2"><br><div class="warning">'.dol_escape_htmltag($mesg).
'</div></td></tr>'.
"\n";
530 print
'</table>'.
"\n";
533 if ($action !=
'dosign') {
534 if ($found && !$error) {
543 print
'</td></tr>'.
"\n";
544 print
'<tr><td class="center">';
547 if ($action ==
"dosign" && empty($cancel)) {
548 print
'<div class="tablepublicpayment">';
549 print
'<input type="button" class="buttonDelete small" id="clearsignature" value="'.$langs->trans(
"ClearSignature").
'">';
550 print
'<input type="text" class="paddingleftonly marginleftonly paddingrightonly marginrightonly" id="name" placeholder="'.$langs->trans(
"Lastname").
'">';
551 print
'<div id="signature" style="border:solid;"></div>';
554 print
'<input type="button" class="button" id="signbutton" value="'.$langs->trans(
"Sign").
'">';
555 print
'<input type="submit" class="button" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
558 print
'<script language="JavaScript" type="text/javascript" src="'.DOL_URL_ROOT.
'/includes/jquery/plugins/jSignature/jSignature.js"></script>
559 <script type="text/javascript">
560 $(document).ready(function() {
561 $("#signature").jSignature({ color:"#000", lineWidth:0, '.(empty($conf->dol_optimize_smallscreen) ?
'' :
'width: 280, ' ).
'height: 180});
563 $("#signature").on("change",function(){
564 $("#clearsignature").css("display","");
565 $("#signbutton").attr("disabled",false);
566 if(!$._data($("#signbutton")[0], "events")){
567 $("#signbutton").on("click",function(){
568 console.log("We click on button sign");
569 $("#signbutton").val(\''.
dol_escape_js($langs->transnoentities(
'PleaseBePatient')).
'\');
570 var signature = $(
"#signature").jSignature(
"getData",
"image");
571 var
name = document.getElementById(
"name").value;
574 url:
"'.DOL_URL_ROOT.'/core/ajax/onlineSign.php",
577 "action" :
"importSignature",
578 "token" : \
''.newToken().
'\',
579 "signaturebase64" : signature,
580 "onlinesignname" :
name,
581 "ref" : \
''.dol_escape_js($REF).
'\',
582 "securekey" : \
''.dol_escape_js($SECUREKEY).
'\',
583 "mode" : \
''.dol_escape_htmltag($source).
'\',
584 "entity" : \
''.dol_escape_htmltag($entity).
'\',
586 success:
function(response) {
587 if(response ==
"success"){
588 console.log(
"Success on saving signature");
589 window.location.replace(
"'.$_SERVER["PHP_SELF
"].'?ref='.urlencode($ref).'&source='.urlencode($source).'&message=signed&securekey='.urlencode($SECUREKEY).(isModEnabled('multicompany')?'&entity='.$entity:'').'");
591 console.error(response);
599 $(
"#clearsignature").on(
"click",
function(){
600 $(
"#signature").jSignature(
"clear");
601 $(
"#signbutton").attr(
"disabled",
true);
605 $(
"#signbutton").attr(
"disabled",
true);
609 if ($source == 'proposal
') {
610 if ($object->status == $object::STATUS_SIGNED) {
612 if ($message == 'signed') {
613 print img_picto('', 'check
', '', false, 0, 0, '', 'size2x
').'<br>
';
614 print '<span
class=
"ok">
'.$langs->trans("PropalSigned").'</span>
';
616 print img_picto('', 'check
', '', false, 0, 0, '', 'size2x
').'<br>
';
617 print '<span
class=
"ok">
'.$langs->trans("PropalAlreadySigned").'</span>
';
619 } elseif ($object->status == $object::STATUS_NOTSIGNED) {
621 if ($message == 'refused
') {
622 print img_picto('', 'cross
', '', false, 0, 0, '', 'size2x
').'<br>
';
623 print '<span
class=
"ok">
'.$langs->trans("PropalRefused").'</span>
';
625 print img_picto('', 'cross
', '', false, 0, 0, '', 'size2x
').'<br>
';
626 print '<span
class=
"warning">
'.$langs->trans("PropalAlreadyRefused").'</span>
';
629 print '<input
type=
"submit" class=
"butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value=
"'.$langs->trans("SignPropal
").'">
';
630 print '<input
name=
"refusepropal" type=
"submit" class=
"butActionDelete small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value=
"'.$langs->trans("RefusePropal
").'">
';
632 } elseif ($source == 'contract
') {
633 if ($message == 'signed') {
634 print '<span
class=
"ok">
'.$langs->trans("ContractSigned").'</span>
';
636 print '<input
type=
"submit" class=
"butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value=
"'.$langs->trans("SignContract
").'">
';
638 } elseif ($source == 'fichinter
') {
639 if ($message == 'signed') {
640 print '<span
class=
"ok">
'.$langs->trans("FichinterSigned").'</span>
';
642 print '<input
type=
"submit" class=
"butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value=
"'.$langs->trans("SignFichinter
").'">
';
646 print '</td></tr>
'."\n";
647 print '</table>
'."\n";
648 print '</form>
'."\n";
653 htmlPrintOnlineFooter($mysoc, $langs);
655 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') && $user->hasRight('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') && $user->hasRight('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)) $sql
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_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)
dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0)
Returns text escaped for inclusion into javascript code.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_print_error_email($prefixcode, $errormessage='', $errormessages=array(), $morecss='error', $email='')
Show a public email and error code to contact if technical error.
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.
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...
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.