30require
'../main.inc.php';
38require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
39require_once DOL_DOCUMENT_ROOT.
'/core/lib/ecm.lib.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/lib/treeview.lib.php';
42require_once DOL_DOCUMENT_ROOT.
'/ecm/class/ecmdirectory.class.php';
45$langs->loadLangs(array(
"ecm",
"companies",
"other",
"users",
"orders",
"propal",
"bills",
"contracts"));
49$action =
GETPOST(
'action',
'aZ09');
55$section_dir =
GETPOST(
'section_dir',
'alpha');
57$search_doc_ref =
GETPOST(
'search_doc_ref',
'alpha');
58$search_doc_date_start =
'';
59$search_doc_date_end =
'';
61 $search_doc_date_start =
GETPOSTDATE(
'search_doc_date_start');
64 $search_doc_date_end =
GETPOSTDATE(
'search_doc_date_end',
'end');
68$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
69$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
71if (empty($page) || $page == -1) {
74$offset = $limit * $page;
81 $sortfield =
"fullname";
83if ($module ==
'invoice_supplier' && $sortfield ==
"fullname") {
84 $sortfield =
"level1name";
89 $result = $ecmdir->fetch($section);
91 dol_print_error($db, $ecmdir->error);
98$userstatic =
new User($db);
104 $socid = $user->socid;
108$hookmanager->initHooks(array(
'ecmautocard',
'globalcard'));
118if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
119 $search_doc_ref =
'';
120 $search_doc_date_start =
'';
121 $search_doc_date_end =
'';
125if ($action ==
'add' && $user->hasRight(
'ecm',
'setup')) {
126 $ecmdir->ref =
'NOTUSEDYET';
127 $ecmdir->label =
GETPOST(
"label");
128 $ecmdir->description =
GETPOST(
"desc");
130 $id = $ecmdir->create($user);
132 header(
"Location: ".$_SERVER[
"PHP_SELF"]);
135 setEventMessages(
'Error '.$langs->trans($ecmdir->error),
null,
'errors');
143if ($action ==
'confirm_deletefile' && $user->hasRight(
'ecm',
'upload')) {
144 if (
GETPOST(
'confirm') ==
'yes') {
145 $langs->load(
"other");
147 $result = $ecmdir->fetch($section);
148 if (!($result > 0)) {
149 dol_print_error($db, $ecmdir->error);
152 $relativepath = $ecmdir->getRelativePath();
156 $upload_dir =
$conf->ecm->dir_output.($relativepath ?
'/'.$relativepath :
'');
157 $file = $upload_dir.
"/".
GETPOST(
'urlfile');
161 setEventMessages($langs->trans(
"FileWasRemoved",
GETPOST(
'urlfile')),
null,
'mesgs');
163 setEventMessages($langs->trans(
"ErrorFailToDeleteFile",
GETPOST(
'urlfile')),
null,
'errors');
166 $result = $ecmdir->changeNbOfFiles(
'-');
170 $action =
'file_manager';
174if ($action ==
'confirm_deletesection' &&
GETPOST(
'confirm') ==
'yes' && $user->hasRight(
'ecm',
'setup')) {
175 $result = $ecmdir->delete($user);
177 setEventMessages($langs->trans(
"ECMSectionWasRemoved", $ecmdir->label),
null,
'mesgs');
179 setEventMessages($ecmdir->error, $ecmdir->errors,
'errors');
188if ($action ==
'refreshmanual' && $user->hasRight(
'ecm',
'read')) {
194 $diroutputslash = str_replace(
'\\',
'/',
$conf->ecm->dir_output);
195 $diroutputslash .=
'/';
198 $disktree =
dol_dir_list(
$conf->ecm->dir_output,
'directories', 1,
'',
'^temp$',
'', 0, 0);
201 $treesqldir = $ecmdirstatic->get_full_arbo(0);
208 foreach ($disktree as $dirdesc) {
209 $dirisindatabase = 0;
210 foreach ($treesqldir as $dirsqldesc) {
211 if (
$conf->ecm->dir_output.
'/'.$dirsqldesc[
'fullrelativename'] == $dirdesc[
'fullname']) {
212 $dirisindatabase = 1;
217 if (!$dirisindatabase) {
218 $txt =
"Directory found on disk ".$dirdesc[
'fullname'].
", not found into database so we add it";
224 $relativepathmissing = str_replace($diroutputslash,
'', $dirdesc[
'fullname']);
225 $relativepathtosearchparent = $relativepathmissing;
227 if (preg_match(
'/\//', $relativepathtosearchparent)) {
229 $relativepathtosearchparent = preg_replace(
'/\/[^\/]*$/',
'', $relativepathtosearchparent);
230 $txt =
"Is relative parent path ".$relativepathtosearchparent.
" for ".$relativepathmissing.
" found in sql tree ?";
233 $parentdirisindatabase = 0;
234 foreach ($treesqldir as $dirsqldesc) {
235 if ($dirsqldesc[
'fullrelativename'] == $relativepathtosearchparent) {
236 $parentdirisindatabase = $dirsqldesc[
'id'];
240 if ($parentdirisindatabase > 0) {
241 dol_syslog(
"Yes with id ".$parentdirisindatabase);
243 $fk_parent = $parentdirisindatabase;
254 if ($fk_parent >= 0) {
255 $ecmdirtmp->ref =
'NOTUSEDYET';
257 $ecmdirtmp->description =
'';
258 $ecmdirtmp->fk_parent = $fk_parent;
260 $txt =
"We create directory ".$ecmdirtmp->label.
" with parent ".$fk_parent;
263 $id = $ecmdirtmp->create($user);
265 $newsqldir = array(
'id' =>
$id,
266 'id_mere' => $ecmdirtmp->fk_parent,
267 'label' => $ecmdirtmp->label,
268 'description' => $ecmdirtmp->description,
269 'fullrelativename' => $relativepathmissing);
270 $treesqldir[] = $newsqldir;
274 dol_syslog(
"Failed to create directory ".$ecmdirtmp->label, LOG_ERR);
277 $txt =
"Parent of ".$dirdesc[
'fullname'].
" not found";
285 foreach ($treesqldir as $dirdesc) {
286 $dirtotest =
$conf->ecm->dir_output.
'/'.$dirdesc[
'fullrelativename'];
288 $ecmdirtmp->id = $dirdesc[
'id'];
289 $ecmdirtmp->delete($user,
'databaseonly');
294 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"ecm_directories set cachenbofdoc = -1 WHERE cachenbofdoc < 0";
300 if ($adirwascreated) {
306if ($action ==
'download_selected' && $module ==
'invoice_supplier' && !$user->hasRight(
'fournisseur',
'facture',
'lire')) {
309if ($action ==
'download_selected' && $module ==
'invoice_supplier' && $user->hasRight(
'fournisseur',
'facture',
'lire')) {
310 $langs->loadLangs(array(
"errors",
"accountancy"));
312 $selectedfiles =
GETPOST(
'selectedfiles',
'array');
313 $selectedfiles = is_array($selectedfiles) ? $selectedfiles : array();
314 $maxformassaction =
getDolGlobalInt(
'MAIN_LIMIT_FOR_MASS_ACTIONS', 1000);
316 if (count($selectedfiles) < 1) {
317 setEventMessages($langs->trans(
"NoRecordSelected"),
null,
'warnings');
318 } elseif (count($selectedfiles) > $maxformassaction) {
319 setEventMessages($langs->trans(
"TooManyRecordForMassAction", $maxformassaction),
null,
'errors');
320 } elseif (!class_exists(
'ZipArchive')) {
321 setEventMessages(
'ZipArchive PHP extension is not available',
null,
'errors');
323 include_once DOL_DOCUMENT_ROOT.
'/fourn/class/fournisseur.facture.class.php';
325 $upload_dir = !empty(
$conf->fournisseur->facture->multidir_output[
$conf->entity]) ?
$conf->fournisseur->facture->multidir_output[
$conf->entity] :
$conf->fournisseur->facture->dir_output;
326 $basepath = realpath($upload_dir);
327 $basepathwithslash = ($basepath ? rtrim($basepath, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR :
'');
328 $filestoarchive = array();
329 $invoicecache = array();
331 foreach ($selectedfiles as $selectedfile) {
332 if (!is_scalar($selectedfile)) {
336 $relativefile = str_replace(
'\\',
'/', (
string) $selectedfile);
337 $relativefile = preg_replace(
'/\/+/',
'/', $relativefile);
338 $relativefile = ltrim($relativefile,
'/');
340 if ($relativefile ==
''
341 || preg_match(
'/(^|\/)\.\.(\/|$)/', $relativefile)
342 || preg_match(
'/[<>|\x00-\x1F]/', $relativefile)
343 || preg_match(
'/(^|\/)(temp|thumbs|CVS|payments)(\/|$)/i', $relativefile)
344 || preg_match(
'/(\.meta|_preview.*\.png)$/i', $relativefile)
350 preg_match(
'/([^\/]+)\/[^\/]+$/', $relativefile, $reg);
351 $ref = (isset($reg[1]) ? $reg[1] :
'');
356 if (is_numeric($ref)) {
361 $cachekey =
$id.
'_'.$ref;
362 if (!array_key_exists($cachekey, $invoicecache)) {
363 $invoicecache[$cachekey] =
false;
367 $result = $objecttmp->fetch(
$id);
369 if (!($result = $objecttmp->fetch(0, $ref))) {
370 $result = $objecttmp->fetchOneLike($ref);
373 if ($result > 0 && (
int) $objecttmp->entity === (
int)
$conf->entity) {
374 $invoicecache[$cachekey] =
true;
377 if (empty($invoicecache[$cachekey])) {
381 $fullpath = realpath($upload_dir.
'/'.$relativefile);
382 if (empty($basepath) || empty($fullpath) || strpos($fullpath, $basepathwithslash) !== 0 || !is_file($fullpath)) {
386 $filestoarchive[$relativefile] = $fullpath;
389 if (count($filestoarchive) < 1) {
390 setEventMessages($langs->trans(
"NoRecordSelected"),
null,
'warnings');
392 $tmpdir = DOL_DATA_ROOT.
'/ecm/temp';
395 if (!is_writable($tmpdir)) {
396 setEventMessages($langs->trans(
"ErrorFailedToWriteInDir", $tmpdir),
null,
'errors');
398 $zipfilename =
'supplier_invoice_documents_'.dol_print_date(
dol_now(),
'dayhourlog').
'.zip';
399 $zipfullpath = $tmpdir.
'/'.$zipfilename;
401 $zip =
new ZipArchive();
402 $result = $zip->open($zipfullpath, ZipArchive::CREATE | ZipArchive::OVERWRITE);
403 if ($result !==
true) {
404 setEventMessages($langs->trans(
"ErrorFailedToBuildArchive", $zipfullpath),
null,
'errors');
407 foreach ($filestoarchive as $relativefile => $fullpath) {
408 $result = $zip->addFile($fullpath, $relativefile);
411 setEventMessages($langs->trans(
"ErrorArchiveAddFile", $relativefile),
null,
'errors');
415 $closeok = $zip->close();
417 if ($errorarchive || !$closeok || !is_file($zipfullpath)) {
418 if (!$errorarchive) {
419 setEventMessages($langs->trans(
"ErrorFailedToBuildArchive", $zipfullpath),
null,
'errors');
424 header(
'Content-Disposition: attachment; filename="'.$zipfilename.
'"');
425 header(
'Content-Length: '.filesize($zipfullpath));
426 readfile($zipfullpath);
447$maxheightwin = (isset($_SESSION[
"dol_screenheight"]) && $_SESSION[
"dol_screenheight"] > 466) ? ($_SESSION[
"dol_screenheight"] - 136) : 660;
454 $morejs[] =
"public/includes/jquery/plugins/jqueryFileTree/jqueryFileTree.js";
457llxHeader($moreheadcss.$moreheadjs, $langs->trans(
"ECMArea"),
'',
'', 0, 0, $morejs,
'',
'',
'mod-ecm page-index_auto');
462$sectionauto = array();
465 $langs->load(
"products");
467 $sectionauto[] = array(
'position' => 10,
'level' => 1,
'module' =>
'product',
'test' => $user->hasRight(
'produit',
'lire'),
'label' => $langs->trans(
"ProductsAndServices"),
'desc' => $langs->trans(
"ECMDocsByProducts"));
471 $sectionauto[] = array(
'position' => 20,
'level' => 1,
'module' =>
'company',
'test' => $user->hasRight(
'societe',
'lire'),
'label' => $langs->trans(
"ThirdParties"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"ThirdParties")));
475 $sectionauto[] = array(
'position' => 30,
'level' => 1,
'module' =>
'propal',
'test' => $user->hasRight(
'propale',
'lire'),
'label' => $langs->trans(
"Proposals"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"Proposals")));
479 $sectionauto[] = array(
'position' => 40,
'level' => 1,
'module' =>
'contract',
'test' => $user->hasRight(
'contrat',
'lire'),
'label' => $langs->trans(
"Contracts"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"Contracts")));
483 $sectionauto[] = array(
'position' => 50,
'level' => 1,
'module' =>
'order',
'test' => $user->hasRight(
'commande',
'lire'),
'label' => $langs->trans(
"CustomersOrders"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"Orders")));
487 $sectionauto[] = array(
'position' => 60,
'level' => 1,
'module' =>
'invoice',
'test' => $user->hasRight(
'facture',
'lire'),
'label' => $langs->trans(
"CustomersInvoices"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"Invoices")));
490 $langs->load(
"supplier_proposal");
492 $sectionauto[] = array(
'position' => 70,
'level' => 1,
'module' =>
'supplier_proposal',
'test' => $user->hasRight(
'supplier_proposal',
'lire'),
'label' => $langs->trans(
"SupplierProposals"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"SupplierProposals")));
496 $sectionauto[] = array(
'position' => 80,
'level' => 1,
'module' =>
'order_supplier',
'test' => $user->hasRight(
'fournisseur',
'commande',
'lire'),
'label' => $langs->trans(
"SuppliersOrders"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"SuppliersOrders")));
500 $sectionauto[] = array(
'position' => 90,
'level' => 1,
'module' =>
'invoice_supplier',
'test' => $user->hasRight(
'fournisseur',
'facture',
'lire'),
'label' => $langs->trans(
"SuppliersInvoices"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"SupplierInvoices")));
503 $langs->load(
"compta");
505 $sectionauto[] = array(
'position' => 100,
'level' => 1,
'module' =>
'tax',
'test' => $user->hasRight(
'tax',
'charges',
'lire'),
'label' => $langs->trans(
"SocialContributions"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"SocialContributions")));
507 $sectionauto[] = array(
'position' => 110,
'level' => 1,
'module' =>
'tax-vat',
'test' => $user->hasRight(
'tax',
'charges',
'lire'),
'label' => $langs->trans(
"VAT"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"VAT")));
510 $langs->load(
"compta");
512 $sectionauto[] = array(
'position' => 120,
'level' => 1,
'module' =>
'salaries',
'test' => $user->hasRight(
'salaries',
'read'),
'label' => $langs->trans(
"Salaries"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"Salaries")));
516 $sectionauto[] = array(
'position' => 130,
'level' => 1,
'module' =>
'project',
'test' => 1,
'label' => $langs->trans(
"Projects"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"Projects")));
518 $sectionauto[] = array(
'position' => 140,
'level' => 1,
'module' =>
'project_task',
'test' => 1,
'label' => $langs->trans(
"Tasks"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"Tasks")));
521 $langs->load(
"interventions");
523 $sectionauto[] = array(
'position' => 150,
'level' => 1,
'module' =>
'fichinter',
'test' => $user->hasRight(
'ficheinter',
'lire'),
'label' => $langs->trans(
"Interventions"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"Interventions")));
526 $langs->load(
"trips");
528 $sectionauto[] = array(
'position' => 160,
'level' => 1,
'module' =>
'expensereport',
'test' => $user->hasRight(
'expensereport',
'lire'),
'label' => $langs->trans(
"ExpenseReports"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"ExpenseReports")));
531 $langs->load(
"holiday");
533 $sectionauto[] = array(
'position' => 170,
'level' => 1,
'module' =>
'holiday',
'test' => $user->hasRight(
'holiday',
'read'),
'label' => $langs->trans(
"Holidays"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"Holidays")));
536 $langs->load(
"banks");
538 $sectionauto[] = array(
'position' => 180,
'level' => 1,
'module' =>
'banque',
'test' => $user->hasRight(
'banque',
'lire'),
'label' => $langs->trans(
"BankAccount"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"BankAccount")));
543 $sectionauto[] = array(
'position' => 190,
'level' => 1,
'module' =>
'chequereceipt',
'test' => $user->hasRight(
'banque',
'lire'),
'label' => $langs->trans(
"CheckReceipt"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"CheckReceipt")));
548 $sectionauto[] = array(
'position' => 200,
'level' => 1,
'module' =>
'mrp-mo',
'test' => $user->hasRight(
'mrp',
'read'),
'label' => $langs->trans(
"MOs"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"ManufacturingOrders")));
551 $langs->load(
"recruitment");
553 $sectionauto[] = array(
'position' => 210,
'level' => 1,
'module' =>
'recruitment-recruitmentcandidature',
'test' => $user->hasRight(
'recruitment',
'read'),
'label' => $langs->trans(
"Candidatures"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"JobApplications")));
556 $sectionauto[] = array(
'position' => 220,
'level' => 1,
'module' =>
'user',
'test' => 1,
'label' => $langs->trans(
"Users"),
'desc' => $langs->trans(
"ECMDocsBy", $langs->transnoentitiesnoconv(
"Users")));
558 $parameters = array();
559 $reshook = $hookmanager->executeHooks(
'addSectionECMAuto', $parameters);
560 if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray) > 0) {
561 $res = $hookmanager->resArray[0];
562 if (is_array($hookmanager->resArray[0])) {
563 $sectionauto = array_merge($sectionauto, $hookmanager->resArray);
564 $rowspan += count($hookmanager->resArray);
566 $sectionauto[] = $hookmanager->resArray;
578if ($action ==
'deletefile' && empty(
$conf->use_javascript_ajax)) {
579 print $form->formconfirm(
dolBuildUrl($_SERVER[
"PHP_SELF"], array(
'section' => $section,
'urlfile' =>
GETPOST(
"urlfile"))), $langs->trans(
'DeleteFile'), $langs->trans(
'ConfirmDeleteFile'),
'confirm_deletefile',
'',
'', 1);
584<!-- Begin div
id=
"containerlayout" -->
585<div
id=
"containerlayout">
586<div
id=
"ecm-layout-north" class=
"toolbar largebutton">
590print
'<div class="inline-block toolbarbutton centpercent">';
596 $paramsrefresh = array(
'action' =>
'refreshmanual');
598 $paramsrefresh[
'module'] =
$module;
601 $paramsrefresh[
'section'] = $section;
603 $url =
dolBuildUrl($_SERVER[
"PHP_SELF"], $paramsrefresh);
605print
'<a href="'.$url.
'" class="inline-block valignmiddle toolbarbutton paddingtop" title="'.
dol_escape_htmltag($langs->trans(
'Refresh')).
'">';
606print img_picto(
'',
'refresh',
'id="refreshbutton"', 0, 0, 0,
'',
'size15x marginrightonly');
614<div
id=
"ecm-layout-west" class=
"inline-block">
620if ($action ==
'delete_section') {
621 print $form->formconfirm(
dolBuildUrl($_SERVER[
"PHP_SELF"], array(
'section' => $section)), $langs->trans(
'DeleteSection'), $langs->trans(
'ConfirmDeleteSection', $ecmdir->label),
'confirm_deletesection',
'',
'', 1);
626if (empty($action) || $action ==
'file_manager' || preg_match(
'/refresh/i', $action) || $action ==
'deletefile') {
627 print
'<table class="liste centpercent noborder">'.
"\n";
629 print
'<!-- Title for auto directories -->'.
"\n";
630 print
'<tr class="liste_titre">'.
"\n";
631 print
'<th class="liste_titre" align="left" colspan="6">';
632 print
' '.$langs->trans(
"ECMSections");
635 $showonrightsize =
'';
638 if (count($sectionauto)) {
639 $htmltooltip = $langs->trans(
"ECMAreaDesc2");
640 $htmltooltip .=
'<br>'.$langs->trans(
"ECMAreaDesc2b");
642 $sectionauto =
dol_sort_array($sectionauto,
'label',
'ASC', 1, 0);
645 print
'<td colspan="6">';
646 print
'<div id="filetreeauto" class="ecmfiletree"><ul class="ecmjqft">';
648 $arrayofmodulesforexternalusers = explode(
',',
getDolGlobalString(
'MAIN_MODULES_FOR_EXTERNAL'));
652 foreach ($sectionauto as $key => $val) {
653 if (empty($val[
'test'])) {
658 if ($user->socid > 0) {
661 if (! in_array($val[
'module'], $arrayofmodulesforexternalusers)) {
667 print
'<li class="directory collapsed">';
668 print
'<a class="fmdirlia jqft ecmjqft" href="'.dolBuildUrl($_SERVER[
"PHP_SELF"], array(
'module' => $val[
'module'])).
'">';
669 print dolPrintLabel($val[
'label']);
672 print
'<div class="ecmjqft">';
674 $htmltooltip =
'<b>'.$langs->trans(
"ECMSection").
'</b>: '.$val[
'label'].
'<br>';
675 $htmltooltip .=
'<b>'.$langs->trans(
"Type").
'</b>: '.$langs->trans(
"ECMSectionAuto").
'<br>';
676 $htmltooltip .=
'<b>'.$langs->trans(
"ECMCreationUser").
'</b>: '.$langs->trans(
"ECMTypeAuto").
'<br>';
677 $htmltooltip .=
'<b>'.$langs->trans(
"Description").
'</b>: '.$val[
'desc'];
678 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
686 print
'</ul></div></td></tr>';
696<div
id=
"ecm-layout-center" class=
"inline-block">
697<div
class=
"pane-in ecm-in-layout-center">
698<div
id=
"ecmfileview" class=
"ecmfileview">
703$url = DOL_URL_ROOT.
'/ecm/index_auto.php';
704include_once DOL_DOCUMENT_ROOT.
'/core/ajax/ajaxdirpreview.php';
713</div> <!-- End div
id=
"containerlayout" -->
718 include DOL_DOCUMENT_ROOT.
'/ecm/tpl/enablefiletreeajax.tpl.php';
$id
Support class for third parties, contacts, members, users or resources.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage ECM directories.
Class to manage suppliers invoices.
Class to manage Dolibarr users.
if(! $sortfield) if(! $sortorder) $module
ecm_prepare_dasboard_head()
Prepare array with list of different ecm main dashboard.
dol_basename($pathfile)
Make a basename working with all page code (default PHP basenamed fails with cyrillic).
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
dol_is_dir($folder)
Test if filename is a directory.
dol_now($mode='gmt')
Return date for now.
GETPOSTDATE($prefix, $hourTime='', $gm='auto', $saverestore='')
Helper function that combines values of a dolibarr DatePicker (such as Form\selectDate) for year,...
dolBuildUrl($url, $params=[], $addtoken=false, $anchor='')
Return path of url.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
getDolGlobalString($key, $default='')
Return a 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_mkdir($dir, $dataroot='', $newmask='')
Creation of a directory (this can create recursive subdir)
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $nodie=0, $mode='')
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.