29 require_once DOL_DOCUMENT_ROOT.
'/core/modules/expedition/modules_expedition.php';
30 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
64 public $phpmin = array(5, 6);
70 public $version =
'dolibarr';
121 global $conf, $langs, $mysoc;
124 $this->
name =
"merou";
125 $this->
description = $langs->trans(
"DocumentModelMerou");
129 $this->page_largeur = $formatarray[
'width'];
130 $this->page_hauteur = round($formatarray[
'height'] / 2);
131 $this->format = array($this->page_largeur, $this->page_hauteur);
132 $this->marge_gauche = isset($conf->global->MAIN_PDF_MARGIN_LEFT) ? $conf->global->MAIN_PDF_MARGIN_LEFT : 10;
133 $this->marge_droite = isset($conf->global->MAIN_PDF_MARGIN_RIGHT) ? $conf->global->MAIN_PDF_MARGIN_RIGHT : 10;
134 $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10;
135 $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10;
137 $this->option_logo = 1;
140 $this->emetteur = $mysoc;
141 if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2);
157 public function write_file(&$object, $outputlangs, $srctemplatepath =
'', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
160 global $user, $conf, $langs, $mysoc, $hookmanager;
162 $object->fetch_thirdparty();
164 if (!is_object($outputlangs)) $outputlangs = $langs;
166 if (!empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output =
'ISO-8859-1';
169 $outputlangs->loadLangs(array(
"main",
"bills",
"products",
"dict",
"companies",
"propal",
"deliveries",
"sendings",
"productbatch"));
171 if ($conf->expedition->dir_output)
173 $object->fetch_thirdparty();
175 $origin = $object->origin;
178 $this->expediteur = $mysoc;
181 $idcontact = $object->$origin->getIdContact(
'external',
'SHIPPING');
182 $this->destinataire =
new Contact($this->
db);
183 if (!empty($idcontact[0])) $this->destinataire->fetch($idcontact[0]);
186 $idcontact = $object->$origin->getIdContact(
'internal',
'LIVREUR');
187 $this->livreur =
new User($this->
db);
188 if (!empty($idcontact[0])) $this->livreur->fetch($idcontact[0]);
191 if ($object->specimen)
193 $dir = $conf->expedition->dir_output.
"/sending";
194 $file = $dir.
"/SPECIMEN.pdf";
197 $dir = $conf->expedition->dir_output.
"/sending/".$expref;
198 $file = $dir.
"/".$expref.
".pdf";
201 if (!file_exists($dir))
205 $this->error = $langs->transnoentities(
"ErrorCanNotCreateDir", $dir);
210 if (file_exists($dir))
213 if (!is_object($hookmanager))
215 include_once DOL_DOCUMENT_ROOT.
'/core/class/hookmanager.class.php';
218 $hookmanager->initHooks(array(
'pdfgeneration'));
219 $parameters = array(
'file'=>$file,
'object'=>$object,
'outputlangs'=>$outputlangs);
221 $reshook = $hookmanager->executeHooks(
'beforePDFCreation', $parameters, $object, $action);
223 $nblines = count($object->lines);
227 $heightforinfotot = 0;
228 $heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5);
229 $heightforfooter = $this->marge_basse + 8;
230 if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS)) $heightforfooter += 6;
231 $pdf->SetAutoPageBreak(1, 0);
233 if (class_exists(
'TCPDF'))
235 $pdf->setPrintHeader(
false);
236 $pdf->setPrintFooter(
false);
240 if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
242 $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.
'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
243 $tplidx = $pdf->importPage(1);
248 $pdf->SetDrawColor(128, 128, 128);
250 if (method_exists($pdf,
'AliasNbPages')) $pdf->AliasNbPages();
252 $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
253 $pdf->SetSubject($outputlangs->transnoentities(
"Shipment"));
254 $pdf->SetCreator(
"Dolibarr ".DOL_VERSION);
255 $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
256 $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref).
" ".$outputlangs->transnoentities(
"Shipment"));
257 if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(
false);
259 $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);
264 $this->
_pagehead($pdf, $object, 1, $outputlangs);
265 $pdf->SetFont(
'',
'', $default_font_size - 3);
266 $pdf->MultiCell(0, 3,
'');
267 $pdf->SetTextColor(0, 0, 0);
270 $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
271 $tab_height = $this->page_hauteur - $tab_top - $heightforfooter;
272 $tab_height_newpage = $this->page_hauteur - $tab_top_newpage - $heightforfooter;
275 if (!empty($object->note_public))
277 $pdf->SetFont(
'',
'', $default_font_size - 1);
278 $pdf->writeHTMLCell(190, 3, $this->marge_gauche, $tab_top,
dol_htmlentitiesbr($object->note_public), 0, 1);
279 $nexY = $pdf->GetY();
280 $height_note = $nexY - $tab_top;
283 $pdf->SetDrawColor(192, 192, 192);
284 $pdf->Rect($this->marge_gauche, $tab_top - 1, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $height_note + 1);
286 $tab_height = $tab_height - $height_note;
287 $tab_top = $nexY + 6;
293 $pdf->SetFillColor(240, 240, 240);
294 $pdf->SetTextColor(0, 0, 0);
295 $pdf->SetXY(10, $tab_top + 5);
297 $iniY = $tab_top + 7;
298 $curY = $tab_top + 7;
299 $nexY = $tab_top + 7;
301 $num = count($object->lines);
303 for ($i = 0; $i < $num; $i++)
306 $pdf->SetFont(
'',
'', $default_font_size - 3);
307 $pdf->SetTextColor(0, 0, 0);
309 $pdf->setTopMargin($tab_top_newpage);
310 $pdf->setPageOrientation(
'', 1, $heightforfooter);
311 $pageposbefore = $pdf->getPage();
314 $libelleproduitservice =
pdf_writelinedesc($pdf, $object, $i, $outputlangs, 90, 3, 50, $curY, 0, 1);
316 $nexY = $pdf->GetY();
317 $pageposafter = $pdf->getPage();
318 $pdf->setPage($pageposbefore);
319 $pdf->setTopMargin($this->marge_haute);
320 $pdf->setPageOrientation(
'', 1, 0);
323 if ($pageposafter > $pageposbefore) {
324 $pdf->setPage($pageposafter); $curY = $tab_top_newpage;
327 $pdf->SetFont(
'',
'', $default_font_size - 3);
330 $pdf->SetDrawColor(120, 120, 120);
331 $pdf->Rect(10 + 3, $curY, 3, 3);
332 $pdf->Rect(20 + 3, $curY, 3, 3);
335 $pdf->SetXY(30, $curY);
336 $pdf->SetFont(
'',
'B', $default_font_size - 3);
337 $pdf->MultiCell(24, 3, $outputlangs->convToOutputCharset($object->lines[$i]->ref), 0,
'L', 0);
339 $pdf->SetXY(140, $curY);
340 $pdf->MultiCell(30, 3, $object->lines[$i]->qty_asked, 0,
'C', 0);
342 $pdf->SetXY(170, $curY);
343 $pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped, 0,
'C', 0);
346 if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
348 $pdf->setPage($pageposafter);
349 $pdf->SetLineStyle(array(
'dash'=>
'1,1',
'color'=>array(80, 80, 80)));
351 $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
352 $pdf->SetLineStyle(array(
'dash'=>0));
358 while ($pagenb < $pageposafter)
360 $pdf->setPage($pagenb);
363 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
365 $this->
_tableau($pdf, $tab_top_newpage - 1, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
367 $this->
_pagefoot($pdf, $object, $outputlangs, 1);
369 $pdf->setPage($pagenb);
370 $pdf->setPageOrientation(
'', 1, 0);
372 if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak)
376 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
378 $this->
_tableau($pdf, $tab_top_newpage - 1, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
380 $this->
_pagefoot($pdf, $object, $outputlangs, 1);
390 $this->
_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
391 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
393 $this->
_tableau($pdf, $tab_top_newpage - 1, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0);
394 $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
398 $this->
_pagefoot($pdf, $object, $outputlangs);
399 if (method_exists($pdf,
'AliasNbPages')) $pdf->AliasNbPages();
403 $pdf->Output($file,
'F');
406 if (!is_object($hookmanager))
408 include_once DOL_DOCUMENT_ROOT.
'/core/class/hookmanager.class.php';
411 $hookmanager->initHooks(array(
'pdfgeneration'));
412 $parameters = array(
'file'=>$file,
'object'=>$object,
'outputlangs'=>$outputlangs);
414 $reshook = $hookmanager->executeHooks(
'afterPDFCreation', $parameters, $this, $action);
417 $this->error = $hookmanager->error;
418 $this->errors = $hookmanager->errors;
421 if (!empty($conf->global->MAIN_UMASK))
422 @chmod($file, octdec($conf->global->MAIN_UMASK));
424 $this->result = array(
'fullpath'=>$file);
428 $this->error = $outputlangs->transnoentities(
"ErrorCanNotCreateDir", $dir);
432 $this->error = $outputlangs->transnoentities(
"ErrorConstantNotDefined",
"EXP_OUTPUTDIR");
450 protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0)
456 $langs->loadLangs(array(
"main",
"bills",
"orders"));
460 $pdf->SetFont(
'',
'B', $default_font_size - 2);
461 $pdf->SetXY(10, $tab_top);
462 $pdf->MultiCell(10, 5,
"LS", 0,
'C', 1);
463 $pdf->line(20, $tab_top, 20, $tab_top + $tab_height);
464 $pdf->SetXY(20, $tab_top);
465 $pdf->MultiCell(10, 5,
"LR", 0,
'C', 1);
466 $pdf->line(30, $tab_top, 30, $tab_top + $tab_height);
467 $pdf->SetXY(30, $tab_top);
468 $pdf->MultiCell(20, 5, $outputlangs->transnoentities(
"Ref"), 0,
'C', 1);
469 $pdf->SetXY(50, $tab_top);
470 $pdf->MultiCell(90, 5, $outputlangs->transnoentities(
"Description"), 0,
'L', 1);
471 $pdf->SetXY(140, $tab_top);
472 $pdf->MultiCell(30, 5, $outputlangs->transnoentities(
"QtyOrdered"), 0,
'C', 1);
473 $pdf->SetXY(170, $tab_top);
474 $pdf->MultiCell(30, 5, $outputlangs->transnoentities(
"QtyToShip"), 0,
'C', 1);
476 $pdf->Rect(10, $tab_top, 190, $tab_height);
489 protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
492 $pdf->SetFont(
'',
'', $default_font_size - 2);
494 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"GoodStatusDeclaration"), 0,
'L');
496 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"ToAndDate"), 0,
'C');
497 $pdf->SetXY(120, -23);
498 $pdf->MultiCell(100, 3, $outputlangs->transnoentities(
"NameAndSignature"), 0,
'C');
518 protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
520 global $conf, $langs, $hookmanager;
527 if ($object->statut == 0 && (!empty($conf->global->SENDING_DRAFT_WATERMARK)))
529 pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur,
'mm', $conf->global->SENDING_DRAFT_WATERMARK);
532 $posy = $this->marge_haute;
533 $posx = $this->page_largeur - $this->marge_droite - 100;
545 $logo = $conf->mycompany->dir_output.
'/logos/'.$this->emetteur->logo;
546 if ($this->emetteur->logo)
548 if (is_readable($logo))
551 $pdf->Image($logo, 10, 5, 0, $height);
553 $pdf->SetTextColor(200, 0, 0);
554 $pdf->SetFont(
'',
'B', $default_font_size - 2);
555 $pdf->MultiCell(100, 3, $langs->transnoentities(
"ErrorLogoFileNotFound", $logo), 0,
'L');
556 $pdf->MultiCell(100, 3, $langs->transnoentities(
"ErrorGoToModuleSetup"), 0,
'L');
559 $text = $this->emetteur->name;
560 $pdf->MultiCell(70, 3, $outputlangs->convToOutputCharset($text), 0,
'L');
565 $pdf->SetXY($Xoff, 7);
566 $pdf->SetFont(
'',
'B', $default_font_size + 2);
567 $pdf->SetTextColor(0, 0, 0);
568 $pdf->MultiCell(0, 3, $outputlangs->transnoentities(
"SendingSheet"),
'',
'L');
573 $pdf->SetXY($Xoff, $Yoff);
574 $pdf->SetFont(
'',
'', $default_font_size - 2);
575 $pdf->SetTextColor(0, 0, 0);
576 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $Xoff, 3, $outputlangs->transnoentities(
"RefSending").
': '.$outputlangs->convToOutputCharset($object->ref),
'',
'R');
579 $origin = $object->origin;
580 $origin_id = $object->origin_id;
583 $posy =
pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3,
'R', $default_font_size - 1, $hookmanager);
591 $blSocX2 = $blSocW + $blSocX;
594 $pdf->SetTextColor(0, 0, 0);
595 $pdf->SetFont(
'',
'B', $default_font_size - 3);
596 $pdf->SetXY($blSocX, $blSocY + 1);
597 $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->name), 0,
'L');
598 $pdf->SetTextColor(0, 0, 0);
601 $carac_emetteur =
pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty,
'', 0,
'source', $object);
603 $pdf->SetFont(
'',
'', $default_font_size - 3);
604 $pdf->SetXY($blSocX, $blSocY + 4);
605 $pdf->MultiCell(80, 2, $carac_emetteur, 0,
'L');
608 if ($object->thirdparty->code_client)
612 $pdf->SetXY($Xoff, $posy);
613 $pdf->SetTextColor(0, 0, 0);
614 $pdf->MultiCell($this->page_largeur - $this->marge_droite - $Xoff, 3, $outputlangs->transnoentities(
"CustomerCode").
" : ".$outputlangs->transnoentities($object->thirdparty->code_client),
'',
'R');
619 $pdf->SetXY($blSocX - 80, $blSocY + 17);
621 $pdf->SetFont(
'',
'B', $default_font_size - 3);
622 $pdf->SetTextColor(0, 0, 0);
623 $pdf->MultiCell(70, 8, $outputlangs->transnoentities(
"DateDeliveryPlanned").
" : ".
dol_print_date($object->date_delivery,
'day',
false, $outputlangs,
true),
'',
'L');
625 $pdf->SetXY($blSocX - 80, $blSocY + 20);
626 $pdf->SetFont(
'',
'B', $default_font_size - 3);
627 $pdf->SetTextColor(0, 0, 0);
628 $pdf->MultiCell(70, 8, $outputlangs->transnoentities(
"TrackingNumber").
" : ".$object->tracking_number,
'',
'L');
631 $pdf->SetXY($blSocX - 80, $blSocY + 23);
632 $pdf->SetFont(
'',
'', $default_font_size - 3);
633 $pdf->SetTextColor(0, 0, 0);
635 if (!empty($object->tracking_number))
637 $object->getUrlTrackingStatus($object->tracking_number);
638 if (!empty($object->tracking_url))
640 if ($object->shipping_method_id > 0)
643 $code = $outputlangs->getLabelFromKey($this->
db, $object->shipping_method_id,
'c_shipment_mode',
'rowid',
'code');
646 $label .= $outputlangs->trans(
"SendingMethod").
": ".$outputlangs->trans(
"SendingMethod".strtoupper($code));
648 if ($object->tracking_url != $object->tracking_number)
651 $label .= $object->tracking_url;
653 $pdf->SetFont(
'',
'B', $default_font_size - 3);
654 $pdf->writeHTMLCell(50, 8,
'',
'', $label,
'',
'L');
658 $pdf->MultiCell(50, 8, $outputlangs->transnoentities(
"Deliverer").
" ".$outputlangs->convToOutputCharset($this->livreur->getFullName($outputlangs)),
'',
'L');
664 $blExpX = $Xoff - 20;
667 $pdf->Rect($blExpX, $Yoff, $blW, 26);
669 $object->fetch_thirdparty();
673 $arrayidcontact = $object->$origin->getIdContact(
'external',
'SHIPPING');
674 if (count($arrayidcontact) > 0)
677 $result = $object->fetch_contact($arrayidcontact[0]);
681 if ($usecontact && ($object->contact->fk_soc != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
682 $thirdparty = $object->contact;
684 $thirdparty = $object->thirdparty;
689 $carac_client =
pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ((!empty($object->contact)) ? $object->contact : null), $usecontact,
'targetwithdetails', $object);
691 $blDestX = $blExpX + 55;
698 $pdf->SetFont(
'',
'B', $default_font_size - 3);
699 $pdf->SetXY($blDestX, $Yoff - 4);
700 $pdf->MultiCell($blW, 3, $outputlangs->transnoentities(
"Recipient"), 0,
'L');
701 $pdf->Rect($blDestX, $Yoff - 1, $blW, 26);
704 $pdf->SetFont(
'',
'B', $default_font_size - 3);
705 $pdf->SetXY($blDestX, $Yoff);
706 $pdf->MultiCell($blW, 3, $carac_client_name, 0,
'L');
708 $posy = $pdf->getY();
711 $pdf->SetFont(
'',
'', $default_font_size - 3);
712 $pdf->SetXY($blDestX, $posy);
713 $pdf->MultiCell($widthrecbox, 4, $carac_client, 0,
'L');
__construct($db=0)
Constructor.
pdf_getFormat(Translate $outputlangs=null, $mode= 'setup')
Return array with format properties of default PDF format.
pdfBuildThirdpartyName($thirdparty, Translate $outputlangs, $includealias=0)
Returns the name of the thirdparty.
pdf_pagehead(&$pdf, $outputlangs, $page_height)
Show header of page for PDF generation.
pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text)
Add a draft watermark on PDF files.
</td > param sortfield sortorder printFieldListOption< tdclass="liste_titremaxwidthsearchright"></td ></tr >< trclass="liste_titre">< inputtype="checkbox"onClick="toggle(this)"/> Ref p ref Label p label Duration p duration center DesiredStock p desiredstock right StockLimitShort p seuil_stock_alerte right stock_physique right stock_real_warehouse right Ordered right StockToBuy right SupplierRef right param sortfield sortorder printFieldListTitle warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow StockTooLow help help help< trclass="oddeven">< td >< inputtype="checkbox"class="check"name="choose'.$i.'"></td >< tdclass="nowrap"> stock</td >< td >< inputtype="hidden"name="desc'.$i.'"value="'.dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
Parent class of sending receipts models.
_pagefoot(&$pdf, $object, $outputlangs, $hidefreetext=0)
Show footer of page.
pdf_getPDFFontSize($outputlangs)
Return font size to use for PDF generation.
Class to manage Dolibarr users.
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom= 'UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
pdf_getPDFFont($outputlangs)
Return font name to use for PDF generation.
$conf db name
Only used if Module[ID]Name translation string is not found.
$conf db
API class for accounts.
write_file(&$object, $outputlangs, $srctemplatepath= '', $hidedetails=0, $hidedesc=0, $hideref=0)
Function to build pdf onto disk.
dol_sanitizeFileName($str, $newstr= '_', $unaccent=1)
Clean a string to use it as a file name.
pdf_getHeightForLogo($logo, $url=false)
Return height to use for Logo onto PDF.
pdf_writeLinkedObjects(&$pdf, $object, $outputlangs, $posx, $posy, $w, $h, $align, $default_font_size)
Show linked objects for PDF generation.
pdf_getInstance($format= '', $metric= 'mm', $pagetype= 'P')
Return a PDF instance object.
pdf_build_address($outputlangs, $sourcecompany, $targetcompany= '', $targetcontact= '', $usecontact=0, $mode= 'source', $object=null)
Return a string with full address formated for output on documents.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
pdf_writelinedesc(&$pdf, $object, $i, $outputlangs, $w, $h, $posx, $posy, $hideref=0, $hidedesc=0, $issupplierline=0)
Output line description into PDF.
_pagehead(&$pdf, $object, $showaddress, $outputlangs)
Show top header of page.
Class to build sending documents with model Merou.
_tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0)
Show table for lines.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
dol_mkdir($dir, $dataroot= '', $newmask=null)
Creation of a directory (this can create recursive subdir)