25if (!defined(
'NOTOKENRENEWAL')) {
26 define(
'NOTOKENRENEWAL',
'1');
28if (!defined(
'NOREQUIREHTML')) {
29 define(
'NOREQUIREHTML',
'1');
31if (!defined(
'NOREQUIREAJAX')) {
32 define(
'NOREQUIREAJAX',
'1');
39if (!defined(
'NOREQUIREMENU')) {
40 define(
'NOREQUIREMENU',
'1');
43if (!defined(
"NOLOGIN")) {
44 define(
"NOLOGIN",
'1');
46if (!defined(
'NOIPCHECK')) {
47 define(
'NOIPCHECK',
'1');
49if (!defined(
'NOBROWSERNOTIF')) {
50 define(
'NOBROWSERNOTIF',
'1');
52$entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
53if (is_numeric($entity)) {
54 define(
"DOLENTITY", $entity);
56include
'../../main.inc.php';
57require_once DOL_DOCUMENT_ROOT .
'/core/lib/files.lib.php';
59$action =
GETPOST(
'action',
'aZ09');
61$signature =
GETPOST(
'signaturebase64');
64$SECUREKEY =
GETPOST(
"securekey");
65$online_sign_name =
GETPOST(
"onlinesignname");
74if ($type ==
'proposal') {
76} elseif ($type ==
'contract') {
78} elseif ($type ==
'fichinter') {
81 $securekeyseed =
getDolGlobalString(strtoupper($type).
'_ONLINE_SIGNATURE_SECURITY_TOKEN');
84if (empty($SECUREKEY) || !
dol_verifyHash($securekeyseed . $type . $ref . (!isModEnabled(
'multicompany') ?
'' : $entity), $SECUREKEY,
'0')) {
89$hookmanager->initHooks(array(
'ajaxonlinesign'));
105if ($action ==
"importSignature") {
106 $issignatureok = (!empty($signature) && $signature[0] ==
"image/png;base64");
107 if ($issignatureok) {
108 $signature = $signature[1];
109 $data = base64_decode($signature);
111 if ($mode ==
"propale" || $mode ==
'proposal') {
112 require_once DOL_DOCUMENT_ROOT .
'/comm/propal/class/propal.class.php';
113 require_once DOL_DOCUMENT_ROOT .
'/core/lib/pdf.lib.php';
117 $upload_dir = !empty($conf->propal->multidir_output[
$object->entity]) ? $conf->propal->multidir_output[
$object->entity] : $conf->propal->dir_output;
122 $langs->loadLangs(array(
"main",
"companies"));
125 $filename =
"signatures/" . $date .
"_signature.png";
126 if (!is_dir($upload_dir .
"signatures/")) {
127 if (!
dol_mkdir($upload_dir .
"signatures/")) {
128 $response =
"Error mkdir. Failed to create dir " . $upload_dir .
"signatures/";
134 $return = file_put_contents($upload_dir . $filename, $data);
135 if ($return ==
false) {
137 $response =
'Error file_put_content: failed to create signature file.';
143 $last_main_doc_file =
$object->last_main_doc;
144 $directdownloadlink =
$object->getLastMainDocLink(
'proposal');
146 if (preg_match(
'/\.pdf/i', $last_main_doc_file)) {
148 $newpdffilename = $upload_dir . $ref .
"_signed-" . $date .
".pdf";
149 $sourcefile = $upload_dir . $ref .
".pdf";
152 $parameters = array(
'sourcefile' => $sourcefile,
'newpdffilename' => $newpdffilename);
153 $reshook = $hookmanager->executeHooks(
'AddSignature', $parameters,
$object, $action);
158 if (empty($reshook)) {
161 if (class_exists(
'TCPDF')) {
162 $pdf->setPrintHeader(
false);
163 $pdf->setPrintFooter(
false);
168 $pdf->SetCompression(
false);
172 $pagecount = $pdf->setSourceFile($sourcefile);
175 $param[
'online_sign_name'] = $online_sign_name;
176 $param[
'pathtoimage'] = $upload_dir . $filename;
179 for ($i = 1; $i < ($pagecount + 1); $i++) {
181 $tppl = $pdf->importPage($i);
182 $s = $pdf->getTemplatesize($tppl);
183 $pdf->AddPage($s[
'h'] > $s[
'w'] ?
'P' :
'L');
184 $pdf->useTemplate($tppl);
185 $propalsignonspecificpage =
getDolGlobalInt(
"PROPAL_SIGNATURE_ON_SPECIFIC_PAGE");
186 if ($propalsignonspecificpage < 0) {
187 $propalsignonspecificpage = $pagecount - abs($propalsignonspecificpage);
190 if (
getDolGlobalString(
"PROPAL_SIGNATURE_ON_ALL_PAGES") || $propalsignonspecificpage == $i) {
197 $param[
'xforimgstart'] = (empty($s[
'w']) ? 120 : round($s[
'w'] / 2) + 15);
202 $param[
'yforimgstart'] = (empty($s[
'h']) ? 240 : $s[
'h'] - 60);
207 $param[
'wforimg'] = $s[
'w'] - 20 - $param[
'xforimgstart'];
213 dol_syslog(
"Error when manipulating the PDF " . $sourcefile .
" by onlineSign: " . $e->getMessage(), LOG_ERR);
214 $response = $e->getMessage();
226 $param[
'xforimgstart'] = (empty($s[
'w']) ? 120 : round($s[
'w'] / 2) + 15);
231 $param[
'yforimgstart'] = (empty($s[
'h']) ? 240 : $s[
'h'] - 60);
236 $param[
'wforimg'] = $s[
'w'] - 20 - $param[
'xforimgstart'];
243 $pdf->Output($newpdffilename,
"F");
246 $object->indexFile($newpdffilename, 1);
249 } elseif (preg_match(
'/\.odt/i', $last_main_doc_file)) {
263 $sql =
"UPDATE " . MAIN_DB_PREFIX .
"propal";
264 $sql .=
" SET fk_statut = " . ((int) $object::STATUS_SIGNED) .
", note_private = '" . $db->escape(
$object->note_private) .
"',";
265 $sql .=
" date_signature = '" . $db->idate(
dol_now()) .
"',";
266 $sql .=
" online_sign_ip = '" . $db->escape($online_sign_ip) .
"'";
267 if ($online_sign_name) {
268 $sql .=
", online_sign_name = '" . $db->escape($online_sign_name) .
"'";
270 $sql .=
" WHERE rowid = " . ((int)
$object->id);
273 $resql = $db->query($sql);
277 $num = $db->affected_rows($resql);
281 if (method_exists(
$object,
'call_trigger')) {
283 $user =
new User($db);
284 $user->fetch(
$object->user_validation_id);
285 $object->context = array(
'closedfromonlinesignature' =>
'closedfromonlinesignature');
286 $result =
$object->call_trigger(
'PROPAL_CLOSE_SIGNED', $user);
289 $response =
"error in trigger " .
$object->error;
291 $response =
"success";
294 $response =
"success";
298 $response =
"error sql";
303 $response =
"success";
309 } elseif ($mode ==
'contract') {
310 require_once DOL_DOCUMENT_ROOT .
'/contrat/class/contrat.class.php';
311 require_once DOL_DOCUMENT_ROOT .
'/core/lib/pdf.lib.php';
315 $upload_dir = !empty($conf->contrat->multidir_output[
$object->entity]) ? $conf->contrat->multidir_output[
$object->entity] : $conf->contrat->dir_output;
319 $filename =
"signatures/" . $date .
"_signature.png";
320 if (!is_dir($upload_dir .
"signatures/")) {
321 if (!
dol_mkdir($upload_dir .
"signatures/")) {
322 $response =
"Error mkdir. Failed to create dir " . $upload_dir .
"signatures/";
328 $return = file_put_contents($upload_dir . $filename, $data);
329 if ($return ==
false) {
331 $response =
'Error file_put_content: failed to create signature file.';
337 $last_main_doc_file =
$object->last_main_doc;
338 $directdownloadlink =
$object->getLastMainDocLink(
'contrat');
340 if (preg_match(
'/\.pdf/i', $last_main_doc_file)) {
342 $newpdffilename = $upload_dir . $ref .
"_signed-" . $date .
".pdf";
343 $sourcefile = $upload_dir . $ref .
".pdf";
346 $parameters = array(
'sourcefile' => $sourcefile,
'newpdffilename' => $newpdffilename);
347 $reshook = $hookmanager->executeHooks(
'AddSignature', $parameters,
$object, $action);
352 if (empty($reshook)) {
355 if (class_exists(
'TCPDF')) {
356 $pdf->setPrintHeader(
false);
357 $pdf->setPrintFooter(
false);
362 $pdf->SetCompression(
false);
366 $pagecount = $pdf->setSourceFile($sourcefile);
369 $param[
'online_sign_name'] = $online_sign_name;
370 $param[
'pathtoimage'] = $upload_dir . $filename;
373 for ($i = 1; $i < ($pagecount + 1); $i++) {
375 $tppl = $pdf->importPage($i);
376 $s = $pdf->getTemplatesize($tppl);
377 $pdf->AddPage($s[
'h'] > $s[
'w'] ?
'P' :
'L');
378 $pdf->useTemplate($tppl);
387 $param[
'xforimgstart'] = 10;
392 $param[
'yforimgstart'] = (empty($s[
'h']) ? 240 : $s[
'h'] - 65);
397 $param[
'wforimg'] = $s[
'w'] / 2 - $param[
'xforimgstart'];
403 dol_syslog(
"Error when manipulating some PDF by onlineSign: " . $e->getMessage(), LOG_ERR);
404 $response = $e->getMessage();
413 $param[
'xforimgstart'] = 10;
414 $param[
'yforimgstart'] = (empty($s[
'h']) ? 240 : $s[
'h'] - 65);
415 $param[
'wforimg'] = $s[
'w'] / 2 - $param[
'xforimgstart'];
421 $pdf->Output($newpdffilename,
"F");
424 $object->indexFile($newpdffilename, 1);
428 $response =
"success";
430 } elseif (preg_match(
'/\.odt/i', $last_main_doc_file)) {
438 } elseif ($mode ==
'fichinter') {
439 require_once DOL_DOCUMENT_ROOT .
'/fichinter/class/fichinter.class.php';
440 require_once DOL_DOCUMENT_ROOT .
'/core/lib/pdf.lib.php';
444 $upload_dir = !empty($conf->ficheinter->multidir_output[
$object->entity]) ? $conf->ficheinter->multidir_output[
$object->entity] : $conf->ficheinter->dir_output;
445 $upload_dir .=
'/'.dol_sanitizeFileName(
$object->ref).
'/';
447 $langs->loadLangs(array(
"main",
"companies"));
453 $filename =
"signatures/" . $date .
"_signature.png";
454 if (!is_dir($upload_dir .
"signatures/")) {
455 if (!
dol_mkdir($upload_dir .
"signatures/")) {
456 $response =
"Error mkdir. Failed to create dir " . $upload_dir .
"signatures/";
462 $return = file_put_contents($upload_dir . $filename, $data);
463 if ($return ==
false) {
465 $response =
'Error file_put_content: failed to create signature file.';
471 $last_main_doc_file =
$object->last_main_doc;
472 $directdownloadlink =
$object->getLastMainDocLink(
'fichinter');
474 if (preg_match(
'/\.pdf/i', $last_main_doc_file)) {
476 $newpdffilename = $upload_dir . $ref .
"_signed-" . $date .
".pdf";
477 $sourcefile = $upload_dir . $ref .
".pdf";
480 $parameters = array(
'sourcefile' => $sourcefile,
'newpdffilename' => $newpdffilename);
481 $reshook = $hookmanager->executeHooks(
'AddSignature', $parameters,
$object, $action);
486 if (empty($reshook)) {
489 if (class_exists(
'TCPDF')) {
490 $pdf->setPrintHeader(
false);
491 $pdf->setPrintFooter(
false);
496 $pdf->SetCompression(
false);
500 $pagecount = $pdf->setSourceFile($sourcefile);
503 $param[
'online_sign_name'] = $online_sign_name;
504 $param[
'pathtoimage'] = $upload_dir . $filename;
507 for ($i = 1; $i < ($pagecount + 1); $i++) {
509 $tppl = $pdf->importPage($i);
510 $s = $pdf->getTemplatesize($tppl);
511 $pdf->AddPage($s[
'h'] > $s[
'w'] ?
'P' :
'L');
512 $pdf->useTemplate($tppl);
521 $param[
'xforimgstart'] = 111;
526 $param[
'yforimgstart'] = (empty($s[
'h']) ? 250 : $s[
'h'] - 60);
531 $param[
'wforimg'] = $s[
'w'] - ($param[
'xforimgstart'] + 16);
537 dol_syslog(
"Error when manipulating some PDF by onlineSign: " . $e->getMessage(), LOG_ERR);
538 $response = $e->getMessage();
547 $param[
'xforimgstart'] = 111;
548 $param[
'yforimgstart'] = (empty($s[
'h']) ? 250 : $s[
'h'] - 60);
549 $param[
'wforimg'] = $s[
'w'] - ($param[
'xforimgstart'] + 16);
555 $pdf->Output($newpdffilename,
"F");
558 $object->indexFile($newpdffilename, 1);
562 $response =
"success";
564 } elseif (preg_match(
'/\.odt/i', $last_main_doc_file)) {
571 $user =
new User($db);
572 $object->setSignedStatus($user, $object::SIGNED_STATUSES[
'STATUS_SIGNED_RECEIVER_ONLINE'], 0,
'FICHINTER_MODIFY');
574 } elseif ($mode ==
"societe_rib") {
575 $langs->load(
'withdrawals');
576 require_once DOL_DOCUMENT_ROOT .
'/societe/class/companybankaccount.class.php';
577 require_once DOL_DOCUMENT_ROOT .
'/core/lib/pdf.lib.php';
578 $modelpath =
"core/modules/bank/doc/";
588 $langs->loadLangs(array(
"main",
"companies"));
591 $filename =
"signatures/" . $date .
"_signature.png";
592 if (!
dol_is_dir($upload_dir .
"signatures/")) {
593 if (!
dol_mkdir($upload_dir .
"signatures/")) {
594 $response =
"Error mkdir. Failed to create dir " . $upload_dir .
"signatures/";
599 $response =
"Error directory " . $upload_dir .
"signatures/ is not writable";
603 $response =
"Error directory " . DOL_DATA_ROOT.
"/admin/temp/ is not writable";
608 $return = file_put_contents($upload_dir . $filename, $data);
609 if ($return ==
false) {
611 $response =
'Error file_put_content: failed to create signature file.';
617 $last_main_doc_file =
$object->last_main_doc;
618 $last_modelpdf =
$object->model_pdf;
619 $directdownloadlink =
$object->getLastMainDocLink(
'company');
621 if (preg_match(
'/\.pdf/i', $last_main_doc_file)) {
623 $newpdffilename =
'';
624 if ($last_modelpdf ==
'sepamandate') {
629 $parameters = array(
'sourcefile' => $sourcefile,
'newpdffilename' => $newpdffilename);
630 $reshook = $hookmanager->executeHooks(
'AddSignature', $parameters,
$object, $action);
635 if (empty($reshook)) {
638 if (class_exists(
'TCPDF')) {
639 $pdf->setPrintHeader(
false);
640 $pdf->setPrintFooter(
false);
645 $pdf->SetCompression(
false);
649 $pagecount = $pdf->setSourceFile($sourcefile);
652 for ($i = 1; $i < ($pagecount + 1); $i++) {
654 $tppl = $pdf->importPage($i);
655 $s = $pdf->getTemplatesize($tppl);
656 $pdf->AddPage($s[
'h'] > $s[
'w'] ?
'P' :
'L');
657 $pdf->useTemplate($tppl);
659 dol_syslog(
"Error when manipulating the PDF " . $sourcefile .
" by onlineSign: " . $e->getMessage(), LOG_ERR);
660 $response = $e->getMessage();
670 $dirmodels = array(
'/');
671 if (is_array($conf->modules_parts[
'models'])) {
672 $dirmodels = array_merge($dirmodels, $conf->modules_parts[
'models']);
674 foreach ($dirmodels as $reldir) {
675 $file =
"pdf_" . $last_modelpdf .
".modules.php";
678 if (file_exists($file)) {
680 $classname =
'pdf_' . $last_modelpdf;
685 if ($filefound ===
'') {
686 $response = $langs->trans(
"Error") .
' Failed to load doc generator with modelpaths=' . $modelpath .
' - modele=' . $last_modelpdf;
691 if (!$error && $classname !==
'') {
695 $objPDF =
new $classname($db);
697 $pdf->SetFont($default_font,
'', $default_font_size - 1);
699 $xForDate = $objPDF->marge_gauche;
700 $yForDate = $objPDF->page_hauteur - $objPDF->heightforinfotot - $objPDF->heightforfreetext - $objPDF->heightforfooter + 10;
701 $pdf->SetXY($xForDate, $yForDate);
704 $xforimgstart = $objPDF->xPosSignArea;
705 $yforimgstart = $yForDate - 5;
706 $wforimg = $s[
'w'] - 20 - $xforimgstart;
709 $param[
'online_sign_name'] = $online_sign_name;
710 $param[
'pathtoimage'] = $upload_dir . $filename;
715 $param[
'xforimgstart'] = $xforimgstart;
716 $param[
'yforimgstart'] = $yforimgstart;
717 $param[
'wforimg'] = $wforimg;
722 $pdf->Output($newpdffilename,
"F");
725 $object->indexFile($newpdffilename, 1);
728 } elseif (preg_match(
'/\.odt/i', $last_main_doc_file)) {
738 $response =
"cannot find BAN/RIB";
746 $sql =
"UPDATE " . MAIN_DB_PREFIX .
$object->table_element;
748 $sql .=
" date_signature = '" . $db->idate(
dol_now()) .
"',";
749 $sql .=
" online_sign_ip = '" . $db->escape($online_sign_ip) .
"'";
750 if ($online_sign_name) {
751 $sql .=
", online_sign_name = '" . $db->escape($online_sign_name) .
"'";
755 $sql .=
" WHERE rowid = " . ((int)
$object->id);
758 $resql = $db->query($sql);
762 $num = $db->affected_rows($resql);
766 $response =
"success";
769 $response =
"error sql";
774 $response =
"success";
780 } elseif ($mode ==
'expedition') {
781 require_once DOL_DOCUMENT_ROOT .
'/expedition/class/expedition.class.php';
782 require_once DOL_DOCUMENT_ROOT .
'/core/lib/pdf.lib.php';
787 $upload_dir = $conf->expedition->dir_output.
"/sending/";
788 $upload_dir .=
'/'.dol_sanitizeFileName(
$object->ref).
'/';
790 $langs->loadLangs(array(
"main",
"companies"));
796 $filename =
"signatures/" . $date .
"_signature.png";
797 if (!is_dir($upload_dir .
"signatures/")) {
798 if (!
dol_mkdir($upload_dir .
"signatures/")) {
799 $response =
"Error mkdir. Failed to create dir " . $upload_dir .
"signatures/";
805 $return = file_put_contents($upload_dir . $filename, $data);
806 if ($return ==
false) {
808 $response =
'Error file_put_content: failed to create signature file.';
813 $last_main_doc_file =
$object->last_main_doc;
815 if (empty($last_main_doc_file) || !
dol_is_file(DOL_DATA_ROOT.
'/'.
$object->last_main_doc)) {
818 $defaulttemplate =
'';
819 $object->generateDocument($defaulttemplate, $langs);
821 $last_main_doc_file =
$object->last_main_doc;
822 $directdownloadlink =
$object->getLastMainDocLink(
'expedition');
824 if (preg_match(
'/\.pdf/i', $last_main_doc_file)) {
826 $newpdffilename = $upload_dir . $ref .
"_signed-" . $date .
".pdf";
827 $sourcefile = $upload_dir . $ref .
".pdf";
830 $parameters = array(
'sourcefile' => $sourcefile,
'newpdffilename' => $newpdffilename);
831 $reshook = $hookmanager->executeHooks(
'AddSignature', $parameters,
$object, $action);
836 if (empty($reshook)) {
839 if (class_exists(
'TCPDF')) {
840 $pdf->setPrintHeader(
false);
841 $pdf->setPrintFooter(
false);
846 $pdf->SetCompression(
false);
850 $pagecount = $pdf->setSourceFile($sourcefile);
853 $param[
'online_sign_name'] = $online_sign_name;
854 $param[
'pathtoimage'] = $upload_dir . $filename;
857 for ($i = 1; $i < ($pagecount + 1); $i++) {
859 $tppl = $pdf->importPage($i);
860 $s = $pdf->getTemplatesize($tppl);
861 $pdf->AddPage($s[
'h'] > $s[
'w'] ?
'P' :
'L');
862 $pdf->useTemplate($tppl);
868 $param[
'xforimgstart'] = 111;
869 $param[
'yforimgstart'] = (empty($s[
'h']) ? 250 : $s[
'h'] - 60);
870 $param[
'wforimg'] = $s[
'w'] - ($param[
'xforimgstart'] + 16);
875 dol_syslog(
"Error when manipulating some PDF by onlineSign: " . $e->getMessage(), LOG_ERR);
876 $response = $e->getMessage();
885 $param[
'xforimgstart'] = 111;
886 $param[
'yforimgstart'] = (empty($s[
'h']) ? 250 : $s[
'h'] - 60);
887 $param[
'wforimg'] = $s[
'w'] - ($param[
'xforimgstart'] + 16);
893 $pdf->Output($newpdffilename,
"F");
896 $object->indexFile($newpdffilename, 1);
900 $response =
"success";
902 } elseif (preg_match(
'/\.odt/i', $last_main_doc_file)) {
914 $sql =
"UPDATE " . MAIN_DB_PREFIX .
"expedition";
915 $sql .=
" SET signed_status = " . ((int) $object::STATUS_SIGNED) ;
916 $sql .=
" WHERE rowid = " . ((int)
$object->id);
919 $resql = $db->query($sql);
923 $num = $db->affected_rows($resql);
928 $response =
"success";
937 $response =
'error signature_not_found';
942 http_response_code(501);
960 $xforimgstart = $params[
'xforimgstart'];
961 $yforimgstart = $params[
'yforimgstart'];
962 $wforimg = $params[
'wforimg'];
964 $pdf->SetXY($xforimgstart, $yforimgstart + round($wforimg / 4) - 4);
965 $pdf->SetFont($default_font,
'', $default_font_size - 1);
966 $pdf->SetTextColor(80, 80, 80);
967 $pdf->MultiCell($wforimg, 4, $langs->trans(
"Signature") .
': ' .
dol_print_date(
dol_now(),
"day",
false, $langs,
true).
' - '.$params[
'online_sign_name'], 0,
'L');
971 $pdf->Image($params[
'pathtoimage'], $xforimgstart, $yforimgstart, $wforimg, round($wforimg / 4));
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Class to manage bank accounts description of third parties.
Class to manage contracts.
Class to manage shipments.
Class to manage interventions.
Class to manage proposals.
Class to manage Dolibarr users.
dol_is_writable($folderorfile)
Test if directory or filename is writable.
dol_is_file($pathoffile)
Return if path is a file.
dol_is_dir($folder)
Test if filename is a directory.
dol_ucfirst($string, $encoding="UTF-8")
Convert first character of the first word of a string to upper.
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
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_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
getUserRemoteIP()
Return the IP of remote user.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
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(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
dolPrintSignatureImage(TCPDF $pdf, $langs, $params)
Output the signature file into the PDF object.
pdf_getPDFFontSize($outputlangs)
Return font size to use for PDF generation.
pdf_getPDFFont($outputlangs)
Return font name to use for PDF generation.
pdf_getInstance($format='', $metric='mm', $pagetype='P')
Return a PDF instance object.
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.
dol_verifyHash($chain, $hash, $type='0')
Compute a hash and compare it to the given one For backward compatibility reasons,...