29require
'../../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
46$action =
GETPOST(
'action',
'aZ09');
48$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
49$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
57if (empty($page) || $page == -1) {
61$offset = $limit * $page;
72if ($action ==
'deletefile') {
73 if (preg_match(
'/^backup\//',
GETPOST(
'urlfile',
'alpha'))) {
74 $file =
$conf->admin->dir_output.
'/backup/'.basename(
GETPOST(
'urlfile',
'alpha'));
82 $file =
$conf->admin->dir_output.
'/documents/'.basename(
GETPOST(
'urlfile',
'alpha'));
105$help_url =
'EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad';
106llxHeader(
'',
'', $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-tools_dolibarr_export');
108print
'<script type="text/javascript">
109jQuery(document).ready(function() {';
112 function hideoptions () {
113 jQuery(
"#mysql_options").hide();
114 jQuery(
"#mysql_nobin_options").hide();
115 jQuery(
"#postgresql_options").hide();
119 jQuery(
"#radio_dump_mysql").click(
function() {
121 jQuery(
"#mysql_options").show();
123 jQuery(
"#radio_dump_mysql_nobin").click(
function() {
125 jQuery(
"#mysql_nobin_options").show();
127 jQuery(
"#radio_dump_postgresql").click(
function() {
129 jQuery(
"#postgresql_options").show();
131 jQuery(
"#select_sql_compat").click(
function() {
132 if (jQuery(
"#select_sql_compat").val() ==
'POSTGRESQL')
134 jQuery(
"#checkbox_dump_disable-add-locks").prop(
'checked',
true);
139if (in_array($type, array(
'mysql',
'mysqli'))) {
140 print
'jQuery("#radio_dump_mysql").click();';
142if (in_array($type, array(
'pgsql'))) {
143 print
'jQuery("#radio_dump_postgresql").click();';
148$title = $langs->trans(
"Backup");
152print
'<div class="center">';
153print $langs->trans(
"BackupDesc", 3);
157print
"<!-- Dump of a server -->\n";
158print
'<form method="post" action="'.DOL_URL_ROOT.
'/admin/tools/export.php" name="dump" spellcheck="false">';
159print
'<input type="hidden" name="token" value="'.newToken().
'" />';
160print
'<input type="hidden" name="export_type" value="server" />';
161print
'<input type="hidden" name="page_y" value="" />';
163print
'<fieldset id="fieldsetexport"><legend class="legendforfieldsetstep" style="font-size: 3em">1</legend>';
165print
'<span class="opacitymedium">';
166print $langs->trans(
"BackupDesc3", $dolibarr_main_db_name).
'<br>';
172print
'<div id="backupdatabaseleft" class="fichehalfleft" >';
174$title = $langs->trans(
"BackupDumpWizard");
181print
'<span class="opacitymedium">'.$langs->trans(
"DatabaseName").
' : </span><b>'.$dolibarr_main_db_name.
'</b><br><br>';
186print
'<table class="centpercent noborderbottom">';
189print
'<td class="tdtop nopaddingleftimp">';
191print
'<div id="div_container_exportoptions">';
192print
'<fieldset id="exportoptions"><legend>'.$langs->trans(
"ExportMethod").
'</legend>';
193if (in_array($type, array(
'mysql',
'mysqli'))) {
194 print
'<div class="formelementrow"><input type="radio" name="what" value="mysql" id="radio_dump_mysql" />';
195 print
'<label for="radio_dump_mysql">MySQL Dump (mysqldump)</label>';
198 print
'<div class="formelementrow"><input type="radio" name="what" value="mysqlnobin" id="radio_dump_mysql_nobin" />';
199 print
'<label for="radio_dump_mysql_nobin">MySQL Dump (php) '.img_warning($langs->trans(
'BackupPHPWarning')).
'</label>';
201} elseif (in_array($type, array(
'pgsql'))) {
202 print
'<div class="formelementrow"><input type="radio" name="what" value="postgresql" id="radio_dump_postgresql" />';
203 print
'<label for="radio_dump_postgresql">PostgreSQL Dump (pg_dump)</label>';
206 print
'No method available with database '.dol_escape_htmltag($label);
215print
'<td class="tdtop nopaddingleftimp">';
217print
'<div class="centpercent center margintoponly marginbottomonly">';
218print
img_picto(
'',
'setup',
'class="pictofixedwidth"').
'<a class="classlink" id="lnk">'.$langs->trans(
"ShowAdvancedOptions").
'...</a>';
221print
'<script type="text/javascript">
222jQuery(document).ready(function() {
223 jQuery("#lnk").click(function() {
224 console.log("We click on link");
229function hideoptions(domelem) {
230 const div = document.getElementById("div_container_sub_exportoptions");
232 if (div.style.display === "none") {
233 div.style.display = "block";
234 domelem.innerText="'.dol_escape_js($langs->transnoentitiesnoconv(
"HideAdvancedoptions")).
'";
236 div.style.display = "none";
237 domelem.innerText="'.
dol_escape_js($langs->transnoentitiesnoconv(
"ShowAdvancedOptions")).
'...";
243print
'<div id="div_container_sub_exportoptions" style="display: none;">';
245if (in_array($type, array(
'mysql',
'mysqli'))) {
246 print
"<!-- Fieldset mysqldump -->\n";
247 print
'<fieldset id="mysql_options">';
249 print
'<fieldset class="formelementrow"><legend>'.$langs->trans(
"FullPathToMysqldumpCommand").
'</legend>';
251 $fullpathofmysqldump =
$db->getPathOfDump();
255 print
'<input type="text" name="mysqldump" style="width: 80%" value="'.$fullpathofmysqldump.
'" spellcheck="false">';
259 print
'<fieldset><legend>'.$langs->trans(
"ExportOptions").
'</legend>';
262 print
'<div class="formelementrow">';
263 print
'<input type="checkbox" name="disable_fk" value="yes" id="checkbox_disable_fk" checked>';
264 print
'<label for="checkbox_disable_fk">'.$langs->trans(
"CommandsToDisableForeignKeysForImport").
' '.
img_info($langs->trans(
'CommandsToDisableForeignKeysForImportWarning')).
'</label>';
268 print
'<label for="select_sql_compat">'.$langs->trans(
"ExportCompatibility").
'</label>';
270 print
'<select name="sql_compat" id="select_sql_compat" class="flat">';
271 print
'<option value="NONE" selected>NONE</option>';
272 print
'<option value="ANSI">ANSI</option>';
273 print
'<option value="DB2">DB2</option>';
274 print
'<option value="MAXDB">MAXDB</option>';
275 print
'<option value="MYSQL323">MYSQL323</option>';
276 print
'<option value="MYSQL40">MYSQL40</option>';
277 print
'<option value="MSSQL">MSSQL</option>';
278 print
'<option value="ORACLE">ORACLE</option>';
279 print
'<option value="POSTGRESQL">POSTGRESQL</option>';
283 print
'<div class="formelementrow">';
284 print
'<input type="checkbox" name="use_transaction" value="yes" id="checkbox_use_transaction" checked="checked">';
285 print
'<label for="checkbox_use_transaction">'.$langs->trans(
"UseTransactionnalMode").
'</label>';
288 print
'<input type="checkbox" name="use_mysql_quick_param" value="yes" id="checkbox_use_quick" checked="checked" />';
289 print
'<label for="checkbox_use_quick">';
290 print $form->textwithpicto($langs->trans(
'ExportUseMySQLQuickParameter'), $langs->trans(
'ExportUseMySQLQuickParameterHelp'));
294 print
'<input type="checkbox" name="use_force" value="no" id="checkbox_use_force" />';
295 print
'<label for="checkbox_use_force">';
296 print $form->textwithpicto($langs->trans(
'ExportUseForce'), $langs->trans(
'ExportUseForceHelp'));
304 if (empty($execmethod)) {
307 if ($execmethod == 1) {
309 print
'<input type="checkbox" name="lowmemorydump" value="1" id="lowmemorydump"'.((GETPOSTISSET(
'lowmemorydump') ?
GETPOSTINT(
'lowmemorydump') :
getDolGlobalInt(
'MAIN_LOW_MEMORY_DUMP')) ?
' checked="checked"' :
'').
'" />';
310 print
'<label for="lowmemorydump">';
311 print $form->textwithpicto($langs->trans(
'ExportUseLowMemoryMode'), $langs->trans(
'ExportUseLowMemoryModeHelp'));
316 print
'<!-- <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" />';
317 print
'<label for="checkbox_drop_database">'.$langs->trans(
"AddDropDatabase").
'</label>';
324 print
'<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" checked />';
325 print
'<label for="checkbox_sql_structure">'.$langs->trans(
'ExportStructure').
'</label>';
328 print
'<input type="checkbox" name="drop"'.((!GETPOSTISSET(
"drop") ||
GETPOST(
'drop')) ?
' checked' :
'').
' id="checkbox_dump_drop" />';
329 print
'<label for="checkbox_dump_drop">'.$langs->trans(
"AddDropTable").
'</label>';
336 print
'<input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" checked />';
337 print
'<label for="checkbox_sql_data">'.$langs->trans(
"Datas").
'</label>';
339 print
'<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" checked />';
340 print
'<label for="checkbox_dump_showcolumns">'.$langs->trans(
"NameColumn").
'</label>';
343 print
'<input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" checked />';
344 print
'<label for="checkbox_dump_extended_ins">'.$langs->trans(
"ExtendedInsert").
'</label>';
347 print
'<input type="checkbox" name="disable-add-locks" value="no" id="checkbox_dump_disable-add-locks" />';
348 print
'<label for="checkbox_dump_disable-add-locks">'.$langs->trans(
"NoLockBeforeInsert").
'</label>';
351 print
'<input type="checkbox" name="delayed" value="yes" id="checkbox_dump_delayed" />';
352 print
'<label for="checkbox_dump_delayed">'.$langs->trans(
"DelayedInsert").
'</label>';
355 print
'<input type="checkbox" name="sql_ignore" value="yes" id="checkbox_dump_ignore" />';
356 print
'<label for="checkbox_dump_ignore">'.$langs->trans(
"IgnoreDuplicateRecords").
'</label>';
359 print
'<input type="checkbox" name="hexforbinary" value="yes" id="checkbox_hexforbinary" checked />';
360 print
'<label for="checkbox_hexforbinary">'.$langs->trans(
"EncodeBinariesInHexa").
'</label>';
363 print
'<input type="checkbox" name="charset_utf8" value="yes" id="checkbox_charset_utf8" checked disabled />';
364 print
'<label for="checkbox_charset_utf8">'.$langs->trans(
"UTF8").
'</label>';
371 print
"<!-- Fieldset mysql_nobin -->\n";
372 print
'<fieldset id="mysql_nobin_options">';
375 print
'<legend>'.$langs->trans(
"ExportOptions").
'</legend>';
377 print
'<div class="formelementrow">';
378 print
'<input type="checkbox" name="nobin_use_transaction" value="yes" id="checkbox_use_transaction" />';
379 print
'<label for="checkbox_use_transaction">'.$langs->trans(
"UseTransactionnalMode").
'</label>';
383 print
'<div class="formelementrow">';
384 print
'<input type="checkbox" name="nobin_disable_fk" value="yes" id="checkbox_disable_fk" checked />';
385 print
'<label for="checkbox_disable_fk">'.$langs->trans(
"CommandsToDisableForeignKeysForImport").
' '.
img_info($langs->trans(
'CommandsToDisableForeignKeysForImportWarning')).
'</label>';
391 print
'<fieldset><legend>'.$langs->trans(
'ExportStructure').
'</legend>';
392 print
'<input type="checkbox" name="nobin_drop"'.((!GETPOSTISSET(
"nobin_drop") ||
GETPOST(
'nobin_drop')) ?
' checked' :
'').
' id="checkbox_dump_drop" />';
393 print
'<label for="checkbox_dump_drop">'.$langs->trans(
"AddDropTable").
'</label>';
399 print
'<legend>'.$langs->trans(
"Datas").
'</legend>';
401 print
'<input type="checkbox" name="nobin_nolocks" value="no" id="checkbox_dump_disable-add-locks" />';
402 print
'<label for="checkbox_dump_disable-add-locks">'.$langs->trans(
"NoLockBeforeInsert").
'</label>';
405 print
'<input type="checkbox" name="nobin_delayed" value="yes" id="checkbox_dump_delayed" />';
406 print
'<label for="checkbox_dump_delayed">'.$langs->trans(
"DelayedInsert").
'</label>';
409 print
'<input type="checkbox" name="nobin_sql_ignore" value="yes" id="checkbox_dump_ignore" />';
410 print
'<label for="checkbox_dump_ignore">'.$langs->trans(
"IgnoreDuplicateRecords").
'</label>';
413 print
'<input type="checkbox" name="nobin_charset_utf8" value="yes" id="checkbox_charset_utf8" checked disabled />';
414 print
'<label for="checkbox_charset_utf8">'.$langs->trans(
"UTF8").
'</label>';
421if (in_array($type, array(
'pgsql'))) {
422 print
"<!-- Fieldset pg_dump -->\n";
423 print
'<fieldset id="postgresql_options">';
426 print
'<fieldset class="formelementrow"><legend>'.$langs->trans(
"FullPathToPostgreSQLdumpCommand").
'</legend>';
428 $fullpathofpgdump =
$db->getPathOfDump();
433 print
'<input type="text" name="postgresqldump" style="width: 80%" value="'.$fullpathofpgdump.
'" />';
438 print
'<legend>'.$langs->trans(
"ExportOptions").
'</legend>';
439 print
'<label for="select_sql_compat">'.$langs->trans(
"ExportCompatibility").
'</label>';
440 print
'<select name="sql_compat" id="select_sql_compat" class="flat">';
441 print
'<option value="POSTGRESQL" selected>POSTGRESQL</option>';
442 print
'<option value="ANSI">ANSI</option>';
445 print
'<!-- <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" />';
446 print
'<label for="checkbox_drop_database">'.$langs->trans(
"AddDropDatabase").
'</label>';
452 print
'<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" checked />';
453 print
'<label for="checkbox_sql_structure">'.$langs->trans(
'ExportStructure').
'</label>';
459 print
'<input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" checked />';
460 print
'<label for="checkbox_sql_data">'.$langs->trans(
"Datas").
'</label>';
462 print
'<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" checked />';
463 print
'<label for="checkbox_dump_showcolumns">'.$langs->trans(
"NameColumn").
'</label>';
477print
'<!--<fieldset>';
478print
'<legend>'.$langs->trans(
"Destination").
'</legend> -->';
480print
'<label for="filename_template" class="line-height-large opacitymedium">'.$langs->trans(
"FileNameToGenerate").
'</label>';
484if (in_array($type, array(
'mysql',
'mysqli'))) {
485 $prefix =
'mysqldump';
492if (in_array($type, array(
'pgsql'))) {
497print
'<input type="text" name="filename_template" style="width: 90%" id="filename_template" value="'.$file.
'" />';
502$compression = array();
503if (in_array($type, array(
'mysql',
'mysqli'))) {
504 $compression[
'gz'] = array(
505 'function' =>
'gzopen',
506 'id' =>
'radio_compression_gzip',
507 'label' => $langs->trans(
"Gzip")
515 $compression[
'bz'] = array(
516 'function' =>
'bzopen',
517 'id' =>
'radio_compression_bzip',
518 'label' => $langs->trans(
"Bzip2")
520 $compression[
'zstd'] = array(
521 'function' =>
'zstd_compress',
522 'id' =>
'radio_compression_zstd',
523 'label' => $langs->trans(
"Zstd")
525 $compression[
'none'] = array(
527 'id' =>
'radio_compression_none',
528 'label' => $langs->trans(
"None")
531 $compression[
'none'] = array(
533 'id' =>
'radio_compression_none',
534 'label' => $langs->trans(
"None")
536 $compression[
'gz'] = array(
537 'function' =>
'gzopen',
538 'id' =>
'radio_compression_gzip',
539 'label' => $langs->trans(
"Gzip")
544print
'<div class="formelementrow">';
547print $langs->trans(
"Compression").
': ';
550foreach ($compression as $key => $val) {
551 if (!$val[
'function'] || function_exists($val[
'function'])) {
555 $checked =
' checked';
557 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'"'.$checked.
'>';
558 print
' <label for="'.$val[
'id'].
'">'.$val[
'label'].
'</label>';
561 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'" disabled>';
562 print
' <label for="'.$val[
'id'].
'">'.$val[
'label'].
'</label>';
563 print
' <span class="opacitymedium">('.$langs->trans(
"NotAvailable").
')</span>';
565 print
' ';
572print
"<!--</fieldset>--> <!-- End destination -->\n";
575print
'<div class="center">';
576print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"GenerateBackup").
'" id="buttonGo">';
580if (!empty($_SESSION[
"commandbackuplastdone"])) {
581 print
'<br><b>'.$langs->trans(
"RunCommandSummary").
':</b><br>'.
"\n";
582 print
'<textarea rows="'.ROWS_2.
'" class="centpercent">'.$_SESSION[
"commandbackuplastdone"].
'</textarea><br>'.
"\n";
588 print
'<b>'.$langs->trans(
"BackupResult").
':</b> ';
589 print $_SESSION[
"commandbackupresult"];
591 $_SESSION[
"commandbackuplastdone"] =
'';
592 $_SESSION[
"commandbackuptorun"] =
'';
593 $_SESSION[
"commandbackupresult"] =
'';
595if (!empty($_SESSION[
"commandbackuptorun"])) {
596 print
'<br><span class="warning">'.$langs->trans(
"YouMustRunCommandFromCommandLineAfterLoginToUser", $dolibarr_main_db_user, $dolibarr_main_db_user).
':</span><br>'.
"\n";
597 print
'<textarea id="commandbackuptoruntext" rows="'.ROWS_2.
'" class="centpercent">'.$_SESSION[
"commandbackuptorun"].
'</textarea><br>'.
"\n";
598 print ajax_autoselect(
"commandbackuptoruntext",
'');
603 $_SESSION[
"commandbackuplastdone"] =
'';
604 $_SESSION[
"commandbackuptorun"] =
'';
605 $_SESSION[
"commandbackupresult"] =
'';
608print
"</div> <!-- end div center button -->\n";
613print
"</div> <!-- end div fichehalfleft -->\n";
616print
'<div id="backupdatabaseright" class="fichehalfright">';
618$filearray =
dol_dir_list(
$conf->admin->dir_output.
'/backup',
'files', 0,
'',
'', $sortfield, (strtolower($sortorder) ==
'asc' ? SORT_ASC : SORT_DESC), 1);
619$result = $formfile->list_of_documents($filearray,
null,
'systemtools',
'', 1,
'backup/', 1, 3, $langs->trans(
"NoBackupFileAvailable"), 0, $langs->trans(
"PreviousDumpFiles"),
'', 0, -1,
'',
'',
'ASC', 1, 0, -1,
'style="height:250px; overflow: auto;"');
627$title = $langs->trans(
"BackupZipWizard");
630print
"<!-- Dump of a server -->\n";
632print
'<form method="post" action="'.DOL_URL_ROOT.
'/admin/tools/export_files.php" name="dump" spellcheck="false">';
633print
'<input type="hidden" name="token" value="'.newToken().
'" />';
634print
'<input type="hidden" name="export_type" value="server" />';
635print
'<input type="hidden" name="page_y" value="" />';
637print
'<fieldset><legend class="legendforfieldsetstep" style="font-size: 3em">2</legend>';
639print
'<span class="opacitymedium">';
640print $langs->trans(
"BackupDesc2", DOL_DATA_ROOT).
'<br>';
641print $langs->trans(
"BackupDescX").
'<br><br>';
644print
'<div id="backupfilesleft" class="fichehalfleft">';
648print
'<label for="zipfilename_template" class="line-height-large paddingbottom opacitymedium">'.$langs->trans(
"FileNameToGenerate").
'</label><br>';
649$prefix =
'documents';
652print
'<input type="text" name="zipfilename_template" style="width: 90%" id="zipfilename_template" value="'.$file.
'" /> <br>';
658print
'<div class="formelementrow">';
661print $langs->trans(
"Compression").
': ';
662$filecompression = $compression;
663unset($filecompression[
'none']);
664$filecompression[
'zip'] = array(
'function' =>
'dol_compress_dir',
'id' =>
'radio_compression_zip',
'label' => $langs->trans(
"FormatZip"));
667foreach ($filecompression as $key => $val) {
668 if (!$val[
'function'] || function_exists($val[
'function'])) {
671 $checked =
' checked';
673 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'2"'.$checked.
'>';
674 print
' <label for="'.$val[
'id'].
'2">'.$val[
'label'].
'</label>';
676 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'2" disabled>';
677 print
' <label for="'.$val[
'id'].
'2">'.$val[
'label'].
'</label>';
678 print
' <span class="opacitymedium">('.$langs->trans(
"NotAvailable").
')</span>';
680 print
' ';
688print
'<div class="center">';
689print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"GenerateBackup").
'" id="buttonGo" /><br>';
695print
'<div id="backupfileright" class="fichehalfright">';
697$filearray =
dol_dir_list(
$conf->admin->dir_output.
'/documents',
'files', 0,
'',
'', $sortfield, (strtolower($sortorder) ==
'asc' ? SORT_ASC : SORT_DESC), 1);
698$result = $formfile->list_of_documents($filearray,
null,
'systemtools',
'', 1,
'documents/', 1, 3, $langs->trans(
"NoBackupFileAvailable"), 0, $langs->trans(
"PreviousArchiveFiles"),
'', 0, -1,
'',
'',
'ASC', 1, 0, -1,
'style="height:250px; overflow: auto;"');
710print
"<!-- Save setup conf -->\n";
712print
'<fieldset><legend class="legendforfieldsetstep" style="font-size: 3em">3</legend>';
716print
'<span class="opacitymedium">';
717print $langs->trans(
"BackupDesc4",
'dolibarr_main_dolcrypt_key or dolibarr_main_instance_unique_id').
'<br>';
722print
'<div id="backupfileright">';
724print $langs->trans(
"SeeValueIntoConfPhp").
'<br>';
725print $langs->trans(
"SeeValueIntoConfPhp2");
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.
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_now($mode='gmt')
Return date for now.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
img_info($titlealt='default')
Show info logo.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.