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;
293 $result = $soc->setAsCustomer();
296 $response = $db->lasterror();
298 $response =
"success";
302 $response =
"success";
306 $response =
"error sql";
311 $response =
"success";
317 } elseif ($mode ==
'contract') {
318 require_once DOL_DOCUMENT_ROOT .
'/contrat/class/contrat.class.php';
319 require_once DOL_DOCUMENT_ROOT .
'/core/lib/pdf.lib.php';
323 $upload_dir = !empty($conf->contrat->multidir_output[
$object->entity]) ? $conf->contrat->multidir_output[
$object->entity] : $conf->contrat->dir_output;
327 $filename =
"signatures/" . $date .
"_signature.png";
328 if (!is_dir($upload_dir .
"signatures/")) {
329 if (!
dol_mkdir($upload_dir .
"signatures/")) {
330 $response =
"Error mkdir. Failed to create dir " . $upload_dir .
"signatures/";
336 $return = file_put_contents($upload_dir . $filename, $data);
337 if ($return ==
false) {
339 $response =
'Error file_put_content: failed to create signature file.';
345 $last_main_doc_file =
$object->last_main_doc;
346 $directdownloadlink =
$object->getLastMainDocLink(
'contrat');
348 if (preg_match(
'/\.pdf/i', $last_main_doc_file)) {
350 $newpdffilename = $upload_dir . $ref .
"_signed-" . $date .
".pdf";
351 $sourcefile = $upload_dir . $ref .
".pdf";
354 $parameters = array(
'sourcefile' => $sourcefile,
'newpdffilename' => $newpdffilename);
355 $reshook = $hookmanager->executeHooks(
'AddSignature', $parameters,
$object, $action);
360 if (empty($reshook)) {
363 if (class_exists(
'TCPDF')) {
364 $pdf->setPrintHeader(
false);
365 $pdf->setPrintFooter(
false);
370 $pdf->SetCompression(
false);
374 $pagecount = $pdf->setSourceFile($sourcefile);
377 $param[
'online_sign_name'] = $online_sign_name;
378 $param[
'pathtoimage'] = $upload_dir . $filename;
381 for ($i = 1; $i < ($pagecount + 1); $i++) {
383 $tppl = $pdf->importPage($i);
384 $s = $pdf->getTemplatesize($tppl);
385 $pdf->AddPage($s[
'h'] > $s[
'w'] ?
'P' :
'L');
386 $pdf->useTemplate($tppl);
395 $param[
'xforimgstart'] = (empty($s[
'w']) ? 110 : $s[
'w'] / 2 - 0);
400 $param[
'yforimgstart'] = (empty($s[
'h']) ? 250 : $s[
'h'] - 62);
405 $param[
'wforimg'] = $s[
'w'] - ($param[
'xforimgstart'] + 16);
411 dol_syslog(
"Error when manipulating some PDF by onlineSign: " . $e->getMessage(), LOG_ERR);
412 $response = $e->getMessage();
421 $param[
'xforimgstart'] = (empty($s[
'w']) ? 110 : $s[
'w'] / 2 - 0);
422 $param[
'yforimgstart'] = (empty($s[
'h']) ? 250 : $s[
'h'] - 62);
423 $param[
'wforimg'] = $s[
'w'] - ($param[
'xforimgstart'] + 16);
429 $pdf->Output($newpdffilename,
"F");
432 $object->indexFile($newpdffilename, 1);
436 $response =
"success";
438 } elseif (preg_match(
'/\.odt/i', $last_main_doc_file)) {
445 $user =
new User($db);
446 $object->setSignedStatus($user, Contrat::$SIGNED_STATUSES[
'STATUS_SIGNED_RECEIVER_ONLINE'], 0,
'CONTRACT_MODIFY');
448 } elseif ($mode ==
'fichinter') {
449 require_once DOL_DOCUMENT_ROOT .
'/fichinter/class/fichinter.class.php';
450 require_once DOL_DOCUMENT_ROOT .
'/core/lib/pdf.lib.php';
454 $upload_dir = !empty($conf->ficheinter->multidir_output[
$object->entity]) ? $conf->ficheinter->multidir_output[
$object->entity] : $conf->ficheinter->dir_output;
455 $upload_dir .=
'/'.dol_sanitizeFileName(
$object->ref).
'/';
457 $langs->loadLangs(array(
"main",
"companies"));
463 $filename =
"signatures/" . $date .
"_signature.png";
464 if (!is_dir($upload_dir .
"signatures/")) {
465 if (!
dol_mkdir($upload_dir .
"signatures/")) {
466 $response =
"Error mkdir. Failed to create dir " . $upload_dir .
"signatures/";
472 $return = file_put_contents($upload_dir . $filename, $data);
473 if ($return ==
false) {
475 $response =
'Error file_put_content: failed to create signature file.';
481 $last_main_doc_file =
$object->last_main_doc;
482 $directdownloadlink =
$object->getLastMainDocLink(
'fichinter');
484 if (preg_match(
'/\.pdf/i', $last_main_doc_file)) {
486 $newpdffilename = $upload_dir . $ref .
"_signed-" . $date .
".pdf";
487 $sourcefile = $upload_dir . $ref .
".pdf";
490 $parameters = array(
'sourcefile' => $sourcefile,
'newpdffilename' => $newpdffilename);
491 $reshook = $hookmanager->executeHooks(
'AddSignature', $parameters,
$object, $action);
496 if (empty($reshook)) {
499 if (class_exists(
'TCPDF')) {
500 $pdf->setPrintHeader(
false);
501 $pdf->setPrintFooter(
false);
506 $pdf->SetCompression(
false);
510 $pagecount = $pdf->setSourceFile($sourcefile);
513 $param[
'online_sign_name'] = $online_sign_name;
514 $param[
'pathtoimage'] = $upload_dir . $filename;
517 for ($i = 1; $i < ($pagecount + 1); $i++) {
519 $tppl = $pdf->importPage($i);
520 $s = $pdf->getTemplatesize($tppl);
521 $pdf->AddPage($s[
'h'] > $s[
'w'] ?
'P' :
'L');
522 $pdf->useTemplate($tppl);
531 $param[
'xforimgstart'] = (empty($s[
'w']) ? 110 : $s[
'w'] / 2 - 2);
536 $param[
'yforimgstart'] = (empty($s[
'h']) ? 250 : $s[
'h'] - 38);
541 $param[
'wforimg'] = $s[
'w'] - ($param[
'xforimgstart'] + 20);
547 dol_syslog(
"Error when manipulating some PDF by onlineSign: " . $e->getMessage(), LOG_ERR);
548 $response = $e->getMessage();
557 $param[
'xforimgstart'] = (empty($s[
'w']) ? 110 : $s[
'w'] / 2 - 2);
558 $param[
'yforimgstart'] = (empty($s[
'h']) ? 250 : $s[
'h'] - 38);
559 $param[
'wforimg'] = $s[
'w'] - ($param[
'xforimgstart'] + 20);
565 $pdf->Output($newpdffilename,
"F");
568 $object->indexFile($newpdffilename, 1);
572 $response =
"success";
574 } elseif (preg_match(
'/\.odt/i', $last_main_doc_file)) {
581 $user =
new User($db);
582 $object->setSignedStatus($user, Fichinter::$SIGNED_STATUSES[
'STATUS_SIGNED_RECEIVER_ONLINE'], 0,
'FICHINTER_MODIFY');
584 } elseif ($mode ==
"societe_rib") {
585 $langs->load(
'withdrawals');
586 require_once DOL_DOCUMENT_ROOT .
'/societe/class/companybankaccount.class.php';
587 require_once DOL_DOCUMENT_ROOT .
'/core/lib/pdf.lib.php';
588 $modelpath =
"core/modules/bank/doc/";
598 $langs->loadLangs(array(
"main",
"companies"));
601 $filename =
"signatures/" . $date .
"_signature.png";
602 if (!
dol_is_dir($upload_dir .
"signatures/")) {
603 if (!
dol_mkdir($upload_dir .
"signatures/")) {
604 $response =
"Error mkdir. Failed to create dir " . $upload_dir .
"signatures/";
609 $response =
"Error directory " . $upload_dir .
"signatures/ is not writable";
613 $response =
"Error directory " . DOL_DATA_ROOT.
"/admin/temp/ is not writable";
618 $return = file_put_contents($upload_dir . $filename, $data);
619 if ($return ==
false) {
621 $response =
'Error file_put_content: failed to create signature file.';
627 $last_main_doc_file =
$object->last_main_doc;
628 $last_modelpdf =
$object->model_pdf;
629 $directdownloadlink =
$object->getLastMainDocLink(
'company');
631 if (preg_match(
'/\.pdf/i', $last_main_doc_file)) {
633 $newpdffilename =
'';
634 if ($last_modelpdf ==
'sepamandate') {
639 $parameters = array(
'sourcefile' => $sourcefile,
'newpdffilename' => $newpdffilename);
640 $reshook = $hookmanager->executeHooks(
'AddSignature', $parameters,
$object, $action);
645 if (empty($reshook)) {
648 if (class_exists(
'TCPDF')) {
649 $pdf->setPrintHeader(
false);
650 $pdf->setPrintFooter(
false);
655 $pdf->SetCompression(
false);
659 $pagecount = $pdf->setSourceFile($sourcefile);
662 for ($i = 1; $i < ($pagecount + 1); $i++) {
664 $tppl = $pdf->importPage($i);
665 $s = $pdf->getTemplatesize($tppl);
666 $pdf->AddPage($s[
'h'] > $s[
'w'] ?
'P' :
'L');
667 $pdf->useTemplate($tppl);
669 dol_syslog(
"Error when manipulating the PDF " . $sourcefile .
" by onlineSign: " . $e->getMessage(), LOG_ERR);
670 $response = $e->getMessage();
680 $dirmodels = array(
'/');
681 if (is_array($conf->modules_parts[
'models'])) {
682 $dirmodels = array_merge($dirmodels, $conf->modules_parts[
'models']);
684 foreach ($dirmodels as $reldir) {
685 $file =
"pdf_" . $last_modelpdf .
".modules.php";
688 if (file_exists($file)) {
690 $classname =
'pdf_' . $last_modelpdf;
695 if ($filefound ===
'') {
696 $response = $langs->trans(
"Error") .
' Failed to load doc generator with modelpaths=' . $modelpath .
' - modele=' . $last_modelpdf;
701 if (!$error && $classname !==
'') {
705 $objPDF =
new $classname($db);
707 $pdf->SetFont($default_font,
'', $default_font_size - 1);
709 $xForDate = $objPDF->marge_gauche;
710 $yForDate = $objPDF->page_hauteur - $objPDF->heightforinfotot - $objPDF->heightforfreetext - $objPDF->heightforfooter + 10;
711 $pdf->SetXY($xForDate, $yForDate);
714 $xforimgstart = $objPDF->xPosSignArea;
715 $yforimgstart = $yForDate - 5;
716 $wforimg = $s[
'w'] - 20 - $xforimgstart;
719 $param[
'online_sign_name'] = $online_sign_name;
720 $param[
'pathtoimage'] = $upload_dir . $filename;
725 $param[
'xforimgstart'] = $xforimgstart;
726 $param[
'yforimgstart'] = $yforimgstart;
727 $param[
'wforimg'] = $wforimg;
732 $pdf->Output($newpdffilename,
"F");
735 $object->indexFile($newpdffilename, 1);
738 } elseif (preg_match(
'/\.odt/i', $last_main_doc_file)) {
748 $response =
"cannot find BAN/RIB";
756 $sql =
"UPDATE " . MAIN_DB_PREFIX .
$object->table_element;
758 $sql .=
" date_signature = '" . $db->idate(
dol_now()) .
"',";
759 $sql .=
" online_sign_ip = '" . $db->escape($online_sign_ip) .
"'";
760 if ($online_sign_name) {
761 $sql .=
", online_sign_name = '" . $db->escape($online_sign_name) .
"'";
765 $sql .=
" WHERE rowid = " . ((int)
$object->id);
768 $resql = $db->query($sql);
772 $num = $db->affected_rows($resql);
776 $response =
"success";
779 $response =
"error sql";
784 $response =
"success";
790 } elseif ($mode ==
'expedition') {
791 require_once DOL_DOCUMENT_ROOT .
'/expedition/class/expedition.class.php';
792 require_once DOL_DOCUMENT_ROOT .
'/core/lib/pdf.lib.php';
797 $upload_dir = $conf->expedition->dir_output.
"/sending/";
798 $upload_dir .=
'/'.dol_sanitizeFileName(
$object->ref).
'/';
800 $langs->loadLangs(array(
"main",
"companies"));
806 $filename =
"signatures/" . $date .
"_signature.png";
807 if (!is_dir($upload_dir .
"signatures/")) {
808 if (!
dol_mkdir($upload_dir .
"signatures/")) {
809 $response =
"Error mkdir. Failed to create dir " . $upload_dir .
"signatures/";
815 $return = file_put_contents($upload_dir . $filename, $data);
816 if ($return ==
false) {
818 $response =
'Error file_put_content: failed to create signature file.';
823 $last_main_doc_file =
$object->last_main_doc;
825 if (empty($last_main_doc_file) || !
dol_is_file(DOL_DATA_ROOT.
'/'.
$object->last_main_doc)) {
828 $defaulttemplate =
'';
829 $object->generateDocument($defaulttemplate, $langs);
831 $last_main_doc_file =
$object->last_main_doc;
832 $directdownloadlink =
$object->getLastMainDocLink(
'expedition');
834 if (preg_match(
'/\.pdf/i', $last_main_doc_file)) {
836 $newpdffilename = $upload_dir . $ref .
"_signed-" . $date .
".pdf";
837 $sourcefile = $upload_dir . $ref .
".pdf";
840 $parameters = array(
'sourcefile' => $sourcefile,
'newpdffilename' => $newpdffilename);
841 $reshook = $hookmanager->executeHooks(
'AddSignature', $parameters,
$object, $action);
846 if (empty($reshook)) {
849 if (class_exists(
'TCPDF')) {
850 $pdf->setPrintHeader(
false);
851 $pdf->setPrintFooter(
false);
856 $pdf->SetCompression(
false);
860 $pagecount = $pdf->setSourceFile($sourcefile);
863 $param[
'online_sign_name'] = $online_sign_name;
864 $param[
'pathtoimage'] = $upload_dir . $filename;
867 for ($i = 1; $i < ($pagecount + 1); $i++) {
869 $tppl = $pdf->importPage($i);
870 $s = $pdf->getTemplatesize($tppl);
871 $pdf->AddPage($s[
'h'] > $s[
'w'] ?
'P' :
'L');
872 $pdf->useTemplate($tppl);
878 $param[
'xforimgstart'] = 111;
879 $param[
'yforimgstart'] = (empty($s[
'h']) ? 250 : $s[
'h'] - 60);
880 $param[
'wforimg'] = $s[
'w'] - ($param[
'xforimgstart'] + 16);
885 dol_syslog(
"Error when manipulating some PDF by onlineSign: " . $e->getMessage(), LOG_ERR);
886 $response = $e->getMessage();
895 $param[
'xforimgstart'] = 111;
896 $param[
'yforimgstart'] = (empty($s[
'h']) ? 250 : $s[
'h'] - 60);
897 $param[
'wforimg'] = $s[
'w'] - ($param[
'xforimgstart'] + 16);
903 $pdf->Output($newpdffilename,
"F");
906 $object->indexFile($newpdffilename, 1);
910 $response =
"success";
912 } elseif (preg_match(
'/\.odt/i', $last_main_doc_file)) {
920 $user =
new User($db);
921 $object->setSignedStatus($user, Expedition::$SIGNED_STATUSES[
'STATUS_SIGNED_RECEIVER_ONLINE'], 0,
'SHIPPING_MODIFY');
925 $response =
'error signature_not_found';
930 http_response_code(501);
948 $xforimgstart = $params[
'xforimgstart'];
949 $yforimgstart = $params[
'yforimgstart'];
950 $wforimg = $params[
'wforimg'];
952 $pdf->SetXY($xforimgstart, $yforimgstart + round($wforimg / 4) - 4);
953 $pdf->SetFont($default_font,
'', $default_font_size - 1);
954 $pdf->SetTextColor(80, 80, 80);
955 $pdf->MultiCell($wforimg, 4, $langs->trans(
"Signature") .
': ' .
dol_print_date(
dol_now(),
"day",
false, $langs,
true).
' - '.$params[
'online_sign_name'], 0,
'L');
959 $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 proposals.
Class to manage third parties objects (customers, suppliers, prospects...)
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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
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,...