28if (!defined(
'NOLOGIN')) {
31if (!defined(
'NOCSRFCHECK')) {
32 define(
"NOCSRFCHECK", 1);
34if (!defined(
'NOIPCHECK')) {
35 define(
'NOIPCHECK',
'1');
37if (!defined(
'NOBROWSERNOTIF')) {
38 define(
'NOBROWSERNOTIF',
'1');
44$entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
45if (is_numeric($entity)) {
46 define(
"DOLENTITY", $entity);
50require
'../../main.inc.php';
51require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
52require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
53require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
54require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
55require_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');
89if (!empty($refusepropal)) {
90 $action =
"refusepropal";
96$urlwithroot = DOL_MAIN_URL_ROOT;
100$SECUREKEY =
GETPOST(
"securekey");
102if (!empty($source)) {
103 $urlok .=
'source='.urlencode($source).
'&';
104 $urlko .=
'source='.urlencode($source).
'&';
107 $urlok .=
'ref='.urlencode($REF).
'&';
108 $urlko .=
'ref='.urlencode($REF).
'&';
110if (!empty($SECUREKEY)) {
111 $urlok .=
'securekey='.urlencode($SECUREKEY).
'&';
112 $urlko .=
'securekey='.urlencode($SECUREKEY).
'&';
114if (!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) {
133if ($source ==
'proposal') {
135} elseif ($source ==
'contract') {
137} elseif ($source ==
'fichinter') {
140if (!
dol_verifyHash($securekeyseed.$type.$ref.(isModEnabled(
'multicompany') ? $entity :
''), $SECUREKEY,
'0')) {
144if ($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'));
170if ($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);
210$form =
new Form($db);
212if (!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>';
220llxHeader($head, $langs->trans(
"OnlineSignature"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea, 1);
222if ($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);
227if (!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));
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="dosign">'.
"\n";
241print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
242print
'<input type="hidden" name="suffix" value="'.GETPOST(
"suffix",
'alpha').
'">'.
"\n";
243print
'<input type="hidden" name="securekey" value="'.$SECUREKEY.
'">'.
"\n";
244print
'<input type="hidden" name="entity" value="'.$entity.
'" />';
245print
'<input type="hidden" name="page_y" value="" />';
247print
'<!-- Form to sign -->'.
"\n";
249print
'<table id="dolpublictable" summary="Payment form" class="center">'.
"\n";
253$logosmall = $mysoc->logo_small;
255$paramlogo =
'ONLINE_SIGN_LOGO_'.$suffix;
256if (!empty($conf->global->$paramlogo)) {
257 $logosmall = $conf->global->$paramlogo;
258} elseif (!empty($conf->global->ONLINE_SIGN_LOGO)) {
259 $logosmall = $conf->global->ONLINE_SIGN_LOGO;
265if (!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>';
284if ($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.
'">';
292if (!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";
316print
'<tr><td align="center">';
317print
'<table with="100%" id="tablepublicpayment">';
318if ($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";
329if ($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";
352 $amount =
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Amount");
353 $amount .=
'</td><td class="CTableRow2">';
354 $amount .=
'<b>'.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).
'</b>';
355 if ($object->multicurrency_code != $conf->currency) {
356 $amount .=
' ('.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).
')';
358 $amount .=
'</td></tr>'.
"\n";
361 $parameters = array(
'source' => $source);
362 $reshook = $hookmanager->executeHooks(
'amountPropalSign', $parameters, $object, $action);
363 if (empty($reshook)) {
364 $amount .= $hookmanager->resPrint;
365 } elseif ($reshook > 0) {
366 $amount = $hookmanager->resPrint;
372 $text =
'<b>'.$langs->trans(
"SignatureProposalRef", $object->ref).
'</b>';
373 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Designation");
374 print
'</td><td class="CTableRow2">'.$text;
376 $last_main_doc_file = $object->last_main_doc;
378 if ($object->status == $object::STATUS_VALIDATED) {
379 if (empty($last_main_doc_file) || !
dol_is_file(DOL_DATA_ROOT.
'/'.$object->last_main_doc)) {
382 $defaulttemplate =
'';
383 $object->generateDocument($defaulttemplate, $langs);
386 $directdownloadlink = $object->getLastMainDocLink(
'proposal');
387 if ($directdownloadlink) {
388 print
'<br><a href="'.$directdownloadlink.
'">';
389 print
img_mime($object->last_main_doc,
'');
390 print $langs->trans(
"DownloadDocument").
'</a>';
393 if ($object->status == $object::STATUS_NOTSIGNED) {
394 $directdownloadlink = $object->getLastMainDocLink(
'proposal');
395 if ($directdownloadlink) {
396 print
'<br><a href="'.$directdownloadlink.
'">';
397 print
img_mime($last_main_doc_file,
'');
398 print $langs->trans(
"DownloadDocument").
'</a>';
400 } elseif ($object->status == $object::STATUS_SIGNED || $object->status == $object::STATUS_BILLED) {
401 if (preg_match(
'/_signed-(\d+)/', $last_main_doc_file)) {
402 $last_main_doc_file_not_signed = preg_replace(
'/_signed-(\d+)/',
'', $last_main_doc_file);
405 $datefilenotsigned =
dol_filemtime($last_main_doc_file_not_signed);
407 if (empty($datefilenotsigned) || $datefilesigned > $datefilenotsigned) {
408 $directdownloadlink = $object->getLastMainDocLink(
'proposal');
409 if ($directdownloadlink) {
410 print
'<br><a href="'.$directdownloadlink.
'">';
411 print
img_mime($object->last_main_doc,
'');
412 print $langs->trans(
"DownloadDocument").
'</a>';
419 print
'<input type="hidden" name="source" value="'.GETPOST(
"source",
'alpha').
'">';
420 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
421 print
'</td></tr>'.
"\n";
422} elseif ($source ==
'contract') {
424 $langs->load(
"contract");
426 $result = $object->fetch_thirdparty($object->socid);
429 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Proposer");
430 print
'</td><td class="CTableRow2">';
431 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
432 print
'<b>'.$creditor.
'</b>';
433 print
'<input type="hidden" name="creditor" value="'.$creditor.
'">';
434 print
'</td></tr>'.
"\n";
437 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"ThirdParty");
438 print
'</td><td class="CTableRow2">';
439 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
440 print
'<b>'.$object->thirdparty->name.
'</b>';
441 print
'</td></tr>'.
"\n";
444 $text =
'<b>'.$langs->trans(
"SignatureContractRef", $object->ref).
'</b>';
445 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Designation");
446 print
'</td><td class="CTableRow2">'.$text;
448 $last_main_doc_file = $object->last_main_doc;
450 if (empty($last_main_doc_file) || !
dol_is_file(DOL_DATA_ROOT.
'/'.$object->last_main_doc)) {
453 $defaulttemplate =
'';
454 $object->generateDocument($defaulttemplate, $langs);
457 $directdownloadlink = $object->getLastMainDocLink(
'contract');
458 if ($directdownloadlink) {
459 print
'<br><a href="'.$directdownloadlink.
'">';
460 print
img_mime($object->last_main_doc,
'');
461 if ($message ==
"signed") {
462 print $langs->trans(
"DownloadSignedDocument").
'</a>';
464 print $langs->trans(
"DownloadDocument").
'</a>';
469 print
'<input type="hidden" name="source" value="'.GETPOST(
"source",
'alpha').
'">';
470 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
471 print
'</td></tr>'.
"\n";
472} elseif ($source ==
'fichinter') {
474 $langs->load(
"fichinter");
476 $result = $object->fetch_thirdparty($object->socid);
479 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Proposer");
480 print
'</td><td class="CTableRow2">';
481 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
482 print
'<b>'.$creditor.
'</b>';
483 print
'<input type="hidden" name="creditor" value="'.$creditor.
'">';
484 print
'</td></tr>'.
"\n";
487 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"ThirdParty");
488 print
'</td><td class="CTableRow2">';
489 print
img_picto(
'',
'company',
'class="pictofixedwidth"');
490 print
'<b>'.$object->thirdparty->name.
'</b>';
491 print
'</td></tr>'.
"\n";
494 $text =
'<b>'.$langs->trans(
"SignatureFichinterRef", $object->ref).
'</b>';
495 print
'<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans(
"Designation");
496 print
'</td><td class="CTableRow2">'.$text;
498 $last_main_doc_file = $object->last_main_doc;
500 if (empty($last_main_doc_file) || !
dol_is_file(DOL_DATA_ROOT.
'/'.$object->last_main_doc)) {
503 $defaulttemplate =
'';
504 $object->generateDocument($defaulttemplate, $langs);
507 $directdownloadlink = $object->getLastMainDocLink(
'fichinter');
508 if ($directdownloadlink) {
509 print
'<br><a href="'.$directdownloadlink.
'">';
510 print
img_mime($object->last_main_doc,
'');
511 if ($message ==
"signed") {
512 print $langs->trans(
"DownloadSignedDocument").
'</a>';
514 print $langs->trans(
"DownloadDocument").
'</a>';
517 print
'<input type="hidden" name="source" value="'.GETPOST(
"source",
'alpha').
'">';
518 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
519 print
'</td></tr>'.
"\n";
523$parameters = array(
'source' => $source);
524$reshook = $hookmanager->executeHooks(
'addFormSign', $parameters, $object, $action);
526if (!$found && !$mesg) {
527 $mesg = $langs->transnoentitiesnoconv(
"ErrorBadParameters");
531 print
'<tr><td class="center" colspan="2"><br><div class="warning">'.dol_escape_htmltag($mesg).
'</div></td></tr>'.
"\n";
534print
'</table>'.
"\n";
537if ($action !=
'dosign') {
538 if ($found && !$error) {
547print
'</td></tr>'.
"\n";
548print
'<tr><td class="center">';
551if ($action ==
"dosign" && empty($cancel)) {
552 print
'<div class="tablepublicpayment">';
553 print
'<input type="button" class="buttonDelete small" id="clearsignature" value="'.$langs->trans(
"ClearSignature").
'">';
554 print
'<input type="text" class="paddingleftonly marginleftonly paddingrightonly marginrightonly" id="name" placeholder="'.$langs->trans(
"Lastname").
'">';
555 print
'<div id="signature" style="border:solid;"></div>';
558 print
'<input type="button" class="button" id="signbutton" value="'.$langs->trans(
"Sign").
'">';
559 print
'<input type="submit" class="button" name="cancel" value="'.$langs->trans(
"Cancel").
'">';
562 print
'<script language="JavaScript" type="text/javascript" src="'.DOL_URL_ROOT.
'/includes/jquery/plugins/jSignature/jSignature.js"></script>
563 <script type="text/javascript">
564 $(document).ready(function() {
565 $("#signature").jSignature({ color:"#000", lineWidth:0, '.(empty($conf->dol_optimize_smallscreen) ?
'' :
'width: 280, ' ).
'height: 180});
567 $("#signature").on("change",function(){
568 $("#clearsignature").css("display","");
569 $("#signbutton").attr("disabled",false);
570 if(!$._data($("#signbutton")[0], "events")){
571 $("#signbutton").on("click",function(){
572 console.log("We click on button sign");
573 $("#signbutton").val(\''.
dol_escape_js($langs->transnoentities(
'PleaseBePatient')).
'\');
574 var signature = $(
"#signature").jSignature(
"getData",
"image");
575 var
name = document.getElementById(
"name").value;
578 url:
"'.DOL_URL_ROOT.'/core/ajax/onlineSign.php",
581 "action" :
"importSignature",
582 "token" : \
''.newToken().
'\',
583 "signaturebase64" : signature,
584 "onlinesignname" :
name,
590 success: function(response) {
591 if(response == "success"){
592 console.log("Success on saving signature");
593 window.location.replace("'.$_SERVER[
"PHP_SELF"].
'?ref='.urlencode($ref).
'&source='.urlencode($source).
'&message=signed&securekey='.urlencode($SECUREKEY).(isModEnabled(
'multicompany')?
'&entity='.$entity:
'').
'");
595 console.error(response);
603 $("#clearsignature").on("click",function(){
604 $("#signature").jSignature("clear");
605 $("#signbutton").attr("disabled",true);
606 // document.getElementById("onlinesignname").value = "";
609 $("#signbutton").attr("disabled",true);
613 if ($source ==
'proposal') {
614 if ($object->status == $object::STATUS_SIGNED) {
616 if ($message ==
'signed') {
617 print
img_picto(
'',
'check',
'',
false, 0, 0,
'',
'size2x').
'<br>';
618 print
'<span class="ok">'.$langs->trans(
"PropalSigned").
'</span>';
620 print
img_picto(
'',
'check',
'',
false, 0, 0,
'',
'size2x').
'<br>';
621 print
'<span class="ok">'.$langs->trans(
"PropalAlreadySigned").
'</span>';
623 } elseif ($object->status == $object::STATUS_NOTSIGNED) {
625 if ($message ==
'refused') {
626 print
img_picto(
'',
'cross',
'',
false, 0, 0,
'',
'size2x').
'<br>';
627 print
'<span class="ok">'.$langs->trans(
"PropalRefused").
'</span>';
629 print
img_picto(
'',
'cross',
'',
false, 0, 0,
'',
'size2x').
'<br>';
630 print
'<span class="warning">'.$langs->trans(
"PropalAlreadyRefused").
'</span>';
633 print
'<input type="submit" class="butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value="'.$langs->trans(
"SignPropal").
'">';
634 print
'<input name="refusepropal" type="submit" class="butActionDelete small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value="'.$langs->trans(
"RefusePropal").
'">';
636 } elseif ($source ==
'contract') {
637 if ($message ==
'signed') {
638 print
'<span class="ok">'.$langs->trans(
"ContractSigned").
'</span>';
640 print
'<input type="submit" class="butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value="'.$langs->trans(
"SignContract").
'">';
642 } elseif ($source ==
'fichinter') {
643 if ($message ==
'signed') {
644 print
'<span class="ok">'.$langs->trans(
"FichinterSigned").
'</span>';
646 print
'<input type="submit" class="butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value="'.$langs->trans(
"SignFichinter").
'">';
650print
'</td></tr>'.
"\n";
651print
'</table>'.
"\n";
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.
htmlPrintOnlineFooter($fromcompany, $langs, $addformmessage=0, $suffix='', $object=null)
Show footer of company in HTML pages.
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.
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.