26require
'../../main.inc.php';
27require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
33$action =
GETPOST(
'action',
'aZ09');
35$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
36$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
44if (empty($page) || $page == -1) {
48$offset = $limit * $page;
59if ($action ==
'deletefile') {
60 if (preg_match(
'/^backup\//',
GETPOST(
'urlfile',
'alpha'))) {
61 $file = $conf->admin->dir_output.
'/backup/'.basename(
GETPOST(
'urlfile',
'alpha'));
69 $file = $conf->admin->dir_output.
'/documents/'.basename(
GETPOST(
'urlfile',
'alpha'));
92$help_url =
'EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad';
93llxHeader(
'',
'', $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-tools_dolibarr_export');
95print
'<script type="text/javascript">
96jQuery(document).ready(function() {';
99 function hideoptions () {
100 jQuery(
"#mysql_options").hide();
101 jQuery(
"#mysql_nobin_options").hide();
102 jQuery(
"#postgresql_options").hide();
106 jQuery(
"#radio_dump_mysql").click(
function() {
108 jQuery(
"#mysql_options").show();
110 jQuery(
"#radio_dump_mysql_nobin").click(
function() {
112 jQuery(
"#mysql_nobin_options").show();
114 jQuery(
"#radio_dump_postgresql").click(
function() {
116 jQuery(
"#postgresql_options").show();
118 jQuery(
"#select_sql_compat").click(
function() {
119 if (jQuery(
"#select_sql_compat").val() ==
'POSTGRESQL')
121 jQuery(
"#checkbox_dump_disable-add-locks").prop(
'checked',
true);
126if (in_array($type, array(
'mysql',
'mysqli'))) {
127 print
'jQuery("#radio_dump_mysql").click();';
129if (in_array($type, array(
'pgsql'))) {
130 print
'jQuery("#radio_dump_postgresql").click();';
135$title = $langs->trans(
"Backup");
140print
'<div class="center">';
141print $langs->trans(
"BackupDesc", DOL_DATA_ROOT);
145print
"<!-- Dump of a server -->\n";
146print
'<form method="post" action="export.php" name="dump">';
147print
'<input type="hidden" name="token" value="'.newToken().
'" />';
148print
'<input type="hidden" name="export_type" value="server" />';
149print
'<input type="hidden" name="page_y" value="" />';
151print
'<fieldset id="fieldsetexport"><legend class="legendforfieldsetstep" style="font-size: 3em">1</legend>';
153print
'<span class="opacitymedium">';
154print $langs->trans(
"BackupDesc3", $dolibarr_main_db_name).
'<br>';
160print
'<div id="backupdatabaseleft" class="fichehalfleft" >';
162$title = $langs->trans(
"BackupDumpWizard");
169print
'<span class="opacitymedium">'.$langs->trans(
"DatabaseName").
' : </span><b>'.$dolibarr_main_db_name.
'</b><br><br>';
174print
'<table class="centpercent noborderbottom">';
177print
'<td class="tdtop nopaddingleftimp">';
179print
'<div id="div_container_exportoptions">';
180print
'<fieldset id="exportoptions"><legend>'.$langs->trans(
"ExportMethod").
'</legend>';
181if (in_array($type, array(
'mysql',
'mysqli'))) {
182 print
'<div class="formelementrow"><input type="radio" name="what" value="mysql" id="radio_dump_mysql" />';
183 print
'<label for="radio_dump_mysql">MySQL Dump (mysqldump)</label>';
186 print
'<div class="formelementrow"><input type="radio" name="what" value="mysqlnobin" id="radio_dump_mysql_nobin" />';
187 print
'<label for="radio_dump_mysql_nobin">MySQL Dump (php) '.img_warning($langs->trans(
'BackupPHPWarning')).
'</label>';
189} elseif (in_array($type, array(
'pgsql'))) {
190 print
'<div class="formelementrow"><input type="radio" name="what" value="postgresql" id="radio_dump_postgresql" />';
191 print
'<label for="radio_dump_postgresql">PostgreSQL Dump (pg_dump)</label>';
194 print
'No method available with database '.dol_escape_htmltag($label);
203print
'<td class="tdtop nopaddingleftimp">';
205print
'<div class="centpercent center margintoponly marginbottomonly">';
206print
img_picto(
'',
'setup',
'class="pictofixedwidth"').
'<a class="classlink" id="lnk">'.$langs->trans(
"ShowAdvancedOptions").
'...</a>';
209print
'<script type="text/javascript">
210jQuery(document).ready(function() {
211 jQuery("#lnk").click(function() {
212 console.log("We click on link");
217function hideoptions(domelem) {
218 const div = document.getElementById("div_container_sub_exportoptions");
220 if (div.style.display === "none") {
221 div.style.display = "block";
222 domelem.innerText="'.dol_escape_js($langs->transnoentitiesnoconv(
"HideAdvancedoptions")).
'";
224 div.style.display = "none";
225 domelem.innerText="'.
dol_escape_js($langs->transnoentitiesnoconv(
"ShowAdvancedOptions")).
'...";
231print
'<div id="div_container_sub_exportoptions" style="display: none;">';
233if (in_array($type, array(
'mysql',
'mysqli'))) {
234 print
"<!-- Fieldset mysqldump -->\n";
235 print
'<fieldset id="mysql_options">';
237 print
'<fieldset class="formelementrow"><legend>'.$langs->trans(
"FullPathToMysqldumpCommand").
'</legend>';
239 $fullpathofmysqldump = $db->getPathOfDump();
243 print
'<input type="text" name="mysqldump" style="width: 80%" value="'.$fullpathofmysqldump.
'">';
247 print
'<fieldset><legend>'.$langs->trans(
"ExportOptions").
'</legend>';
250 print
'<div class="formelementrow">';
251 print
'<input type="checkbox" name="disable_fk" value="yes" id="checkbox_disable_fk" checked>';
252 print
'<label for="checkbox_disable_fk">'.$langs->trans(
"CommandsToDisableForeignKeysForImport").
' '.
img_info($langs->trans(
'CommandsToDisableForeignKeysForImportWarning')).
'</label>';
256 print
'<label for="select_sql_compat">'.$langs->trans(
"ExportCompatibility").
'</label>';
258 print
'<select name="sql_compat" id="select_sql_compat" class="flat">';
259 print
'<option value="NONE" selected>NONE</option>';
260 print
'<option value="ANSI">ANSI</option>';
261 print
'<option value="DB2">DB2</option>';
262 print
'<option value="MAXDB">MAXDB</option>';
263 print
'<option value="MYSQL323">MYSQL323</option>';
264 print
'<option value="MYSQL40">MYSQL40</option>';
265 print
'<option value="MSSQL">MSSQL</option>';
266 print
'<option value="ORACLE">ORACLE</option>';
267 print
'<option value="POSTGRESQL">POSTGRESQL</option>';
271 print
'<div class="formelementrow">';
272 print
'<input type="checkbox" name="use_transaction" value="yes" id="checkbox_use_transaction" checked="checked">';
273 print
'<label for="checkbox_use_transaction">'.$langs->trans(
"UseTransactionnalMode").
'</label>';
276 print
'<input type="checkbox" name="use_mysql_quick_param" value="yes" id="checkbox_use_quick" checked="checked" />';
277 print
'<label for="checkbox_use_quick">';
278 print $form->textwithpicto($langs->trans(
'ExportUseMySQLQuickParameter'), $langs->trans(
'ExportUseMySQLQuickParameterHelp'));
282 print
'<input type="checkbox" name="use_force" value="no" id="checkbox_use_force" />';
283 print
'<label for="checkbox_use_force">';
284 print $form->textwithpicto($langs->trans(
'ExportUseForce'), $langs->trans(
'ExportUseForceHelp'));
292 if (empty($execmethod)) {
295 if ($execmethod == 1) {
297 print
'<input type="checkbox" name="lowmemorydump" value="yes" id="lowmemorydump"'.((GETPOSTISSET(
'lowmemorydump') ?
GETPOST(
'lowmemorydump',
'alpha') :
getDolGlobalString(
'MAIN_LOW_MEMORY_DUMP')) ?
' checked="checked"' :
'').
'" />';
298 print
'<label for="lowmemorydump">';
299 print $form->textwithpicto($langs->trans(
'ExportUseLowMemoryMode'), $langs->trans(
'ExportUseLowMemoryModeHelp'));
304 print
'<!-- <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" />';
305 print
'<label for="checkbox_drop_database">'.$langs->trans(
"AddDropDatabase").
'</label>';
312 print
'<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" checked />';
313 print
'<label for="checkbox_sql_structure">'.$langs->trans(
'ExportStructure').
'</label>';
316 print
'<input type="checkbox" name="drop"'.((!GETPOSTISSET(
"drop") ||
GETPOST(
'drop')) ?
' checked' :
'').
' id="checkbox_dump_drop" />';
317 print
'<label for="checkbox_dump_drop">'.$langs->trans(
"AddDropTable").
'</label>';
324 print
'<input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" checked />';
325 print
'<label for="checkbox_sql_data">'.$langs->trans(
"Datas").
'</label>';
327 print
'<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" checked />';
328 print
'<label for="checkbox_dump_showcolumns">'.$langs->trans(
"NameColumn").
'</label>';
331 print
'<input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" checked />';
332 print
'<label for="checkbox_dump_extended_ins">'.$langs->trans(
"ExtendedInsert").
'</label>';
335 print
'<input type="checkbox" name="disable-add-locks" value="no" id="checkbox_dump_disable-add-locks" />';
336 print
'<label for="checkbox_dump_disable-add-locks">'.$langs->trans(
"NoLockBeforeInsert").
'</label>';
339 print
'<input type="checkbox" name="delayed" value="yes" id="checkbox_dump_delayed" />';
340 print
'<label for="checkbox_dump_delayed">'.$langs->trans(
"DelayedInsert").
'</label>';
343 print
'<input type="checkbox" name="sql_ignore" value="yes" id="checkbox_dump_ignore" />';
344 print
'<label for="checkbox_dump_ignore">'.$langs->trans(
"IgnoreDuplicateRecords").
'</label>';
347 print
'<input type="checkbox" name="hexforbinary" value="yes" id="checkbox_hexforbinary" checked />';
348 print
'<label for="checkbox_hexforbinary">'.$langs->trans(
"EncodeBinariesInHexa").
'</label>';
351 print
'<input type="checkbox" name="charset_utf8" value="yes" id="checkbox_charset_utf8" checked disabled />';
352 print
'<label for="checkbox_charset_utf8">'.$langs->trans(
"UTF8").
'</label>';
359 print
"<!-- Fieldset mysql_nobin -->\n";
360 print
'<fieldset id="mysql_nobin_options">';
363 print
'<legend>'.$langs->trans(
"ExportOptions").
'</legend>';
365 print
'<div class="formelementrow">';
366 print
'<input type="checkbox" name="nobin_use_transaction" value="yes" id="checkbox_use_transaction" />';
367 print
'<label for="checkbox_use_transaction">'.$langs->trans(
"UseTransactionnalMode").
'</label>';
371 print
'<div class="formelementrow">';
372 print
'<input type="checkbox" name="nobin_disable_fk" value="yes" id="checkbox_disable_fk" checked />';
373 print
'<label for="checkbox_disable_fk">'.$langs->trans(
"CommandsToDisableForeignKeysForImport").
' '.
img_info($langs->trans(
'CommandsToDisableForeignKeysForImportWarning')).
'</label>';
379 print
'<fieldset><legend>'.$langs->trans(
'ExportStructure').
'</legend>';
380 print
'<input type="checkbox" name="nobin_drop"'.((!GETPOSTISSET(
"nobin_drop") ||
GETPOST(
'nobin_drop')) ?
' checked' :
'').
' id="checkbox_dump_drop" />';
381 print
'<label for="checkbox_dump_drop">'.$langs->trans(
"AddDropTable").
'</label>';
387 print
'<legend>'.$langs->trans(
"Datas").
'</legend>';
389 print
'<input type="checkbox" name="nobin_nolocks" value="no" id="checkbox_dump_disable-add-locks" />';
390 print
'<label for="checkbox_dump_disable-add-locks">'.$langs->trans(
"NoLockBeforeInsert").
'</label>';
393 print
'<input type="checkbox" name="nobin_delayed" value="yes" id="checkbox_dump_delayed" />';
394 print
'<label for="checkbox_dump_delayed">'.$langs->trans(
"DelayedInsert").
'</label>';
397 print
'<input type="checkbox" name="nobin_sql_ignore" value="yes" id="checkbox_dump_ignore" />';
398 print
'<label for="checkbox_dump_ignore">'.$langs->trans(
"IgnoreDuplicateRecords").
'</label>';
401 print
'<input type="checkbox" name="nobin_charset_utf8" value="yes" id="checkbox_charset_utf8" checked disabled />';
402 print
'<label for="checkbox_charset_utf8">'.$langs->trans(
"UTF8").
'</label>';
409if (in_array($type, array(
'pgsql'))) {
410 print
"<!-- Fieldset pg_dump -->\n";
411 print
'<fieldset id="postgresql_options">';
414 print
'<fieldset class="formelementrow"><legend>'.$langs->trans(
"FullPathToPostgreSQLdumpCommand").
'</legend>';
416 $fullpathofpgdump = $db->getPathOfDump();
421 print
'<input type="text" name="postgresqldump" style="width: 80%" value="'.$fullpathofpgdump.
'" />';
426 print
'<legend>'.$langs->trans(
"ExportOptions").
'</legend>';
427 print
'<label for="select_sql_compat">'.$langs->trans(
"ExportCompatibility").
'</label>';
428 print
'<select name="sql_compat" id="select_sql_compat" class="flat">';
429 print
'<option value="POSTGRESQL" selected>POSTGRESQL</option>';
430 print
'<option value="ANSI">ANSI</option>';
433 print
'<!-- <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" />';
434 print
'<label for="checkbox_drop_database">'.$langs->trans(
"AddDropDatabase").
'</label>';
440 print
'<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" checked />';
441 print
'<label for="checkbox_sql_structure">'.$langs->trans(
'ExportStructure').
'</label>';
447 print
'<input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" checked />';
448 print
'<label for="checkbox_sql_data">'.$langs->trans(
"Datas").
'</label>';
450 print
'<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" checked />';
451 print
'<label for="checkbox_dump_showcolumns">'.$langs->trans(
"NameColumn").
'</label>';
465print
'<!--<fieldset>';
466print
'<legend>'.$langs->trans(
"Destination").
'</legend> -->';
468print
'<label for="filename_template" class="line-height-large opacitymedium">'.$langs->trans(
"FileNameToGenerate").
'</label>';
472if (in_array($type, array(
'mysql',
'mysqli'))) {
473 $prefix =
'mysqldump';
480if (in_array($type, array(
'pgsql'))) {
485print
'<input type="text" name="filename_template" style="width: 90%" id="filename_template" value="'.$file.
'" />';
490$compression = array();
491if (in_array($type, array(
'mysql',
'mysqli'))) {
492 $compression[
'gz'] = array(
493 'function' =>
'gzopen',
494 'id' =>
'radio_compression_gzip',
495 'label' => $langs->trans(
"Gzip")
503 $compression[
'bz'] = array(
504 'function' =>
'bzopen',
505 'id' =>
'radio_compression_bzip',
506 'label' => $langs->trans(
"Bzip2")
508 $compression[
'zstd'] = array(
509 'function' =>
'zstd_compress',
510 'id' =>
'radio_compression_zstd',
511 'label' => $langs->trans(
"Zstd")
513 $compression[
'none'] = array(
515 'id' =>
'radio_compression_none',
516 'label' => $langs->trans(
"None")
519 $compression[
'none'] = array(
521 'id' =>
'radio_compression_none',
522 'label' => $langs->trans(
"None")
524 $compression[
'gz'] = array(
525 'function' =>
'gzopen',
526 'id' =>
'radio_compression_gzip',
527 'label' => $langs->trans(
"Gzip")
532print
'<div class="formelementrow">';
535print $langs->trans(
"Compression").
': ';
538foreach ($compression as $key => $val) {
539 if (!$val[
'function'] || function_exists($val[
'function'])) {
543 $checked =
' checked';
545 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'"'.$checked.
'>';
546 print
' <label for="'.$val[
'id'].
'">'.$val[
'label'].
'</label>';
549 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'" disabled>';
550 print
' <label for="'.$val[
'id'].
'">'.$val[
'label'].
'</label>';
551 print
' <span class="opacitymedium">('.$langs->trans(
"NotAvailable").
')</span>';
553 print
' ';
560print
"<!--</fieldset>--> <!-- End destination -->\n";
563print
'<div class="center">';
564print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"GenerateBackup").
'" id="buttonGo">';
568if (!empty($_SESSION[
"commandbackuplastdone"])) {
569 print
'<br><b>'.$langs->trans(
"RunCommandSummary").
':</b><br>'.
"\n";
570 print
'<textarea rows="'.ROWS_2.
'" class="centpercent">'.$_SESSION[
"commandbackuplastdone"].
'</textarea><br>'.
"\n";
576 print
'<b>'.$langs->trans(
"BackupResult").
':</b> ';
577 print $_SESSION[
"commandbackupresult"];
579 $_SESSION[
"commandbackuplastdone"] =
'';
580 $_SESSION[
"commandbackuptorun"] =
'';
581 $_SESSION[
"commandbackupresult"] =
'';
583if (!empty($_SESSION[
"commandbackuptorun"])) {
584 print
'<br><span class="warning">'.$langs->trans(
"YouMustRunCommandFromCommandLineAfterLoginToUser", $dolibarr_main_db_user, $dolibarr_main_db_user).
':</span><br>'.
"\n";
585 print
'<textarea id="commandbackuptoruntext" rows="'.ROWS_2.
'" class="centpercent">'.$_SESSION[
"commandbackuptorun"].
'</textarea><br>'.
"\n";
591 $_SESSION[
"commandbackuplastdone"] =
'';
592 $_SESSION[
"commandbackuptorun"] =
'';
593 $_SESSION[
"commandbackupresult"] =
'';
596print
"</div> <!-- end div center button -->\n";
601print
"</div> <!-- end div fichehalfleft -->\n";
604print
'<div id="backupdatabaseright" class="fichehalfright">';
606$filearray =
dol_dir_list($conf->admin->dir_output.
'/backup',
'files', 0,
'',
'', $sortfield, (strtolower($sortorder) ==
'asc' ? SORT_ASC : SORT_DESC), 1);
607$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;"');
615$title = $langs->trans(
"BackupZipWizard");
618print
"<!-- Dump of a server -->\n";
620print
'<form method="post" action="export_files.php" name="dump">';
621print
'<input type="hidden" name="token" value="'.newToken().
'" />';
622print
'<input type="hidden" name="export_type" value="server" />';
623print
'<input type="hidden" name="page_y" value="" />';
625print
'<fieldset><legend class="legendforfieldsetstep" style="font-size: 3em">2</legend>';
627print
'<span class="opacitymedium">';
628print $langs->trans(
"BackupDesc2", DOL_DATA_ROOT).
'<br>';
629print $langs->trans(
"BackupDescX").
'<br><br>';
632print
'<div id="backupfilesleft" class="fichehalfleft">';
636print
'<label for="zipfilename_template" class="line-height-large paddingbottom opacitymedium">'.$langs->trans(
"FileNameToGenerate").
'</label><br>';
637$prefix =
'documents';
640print
'<input type="text" name="zipfilename_template" style="width: 90%" id="zipfilename_template" value="'.$file.
'" /> <br>';
646print
'<div class="formelementrow">';
649print $langs->trans(
"Compression").
': ';
650$filecompression = $compression;
651unset($filecompression[
'none']);
652$filecompression[
'zip'] = array(
'function' =>
'dol_compress_dir',
'id' =>
'radio_compression_zip',
'label' => $langs->trans(
"FormatZip"));
655foreach ($filecompression as $key => $val) {
656 if (!$val[
'function'] || function_exists($val[
'function'])) {
659 $checked =
' checked';
661 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'2"'.$checked.
'>';
662 print
' <label for="'.$val[
'id'].
'2">'.$val[
'label'].
'</label>';
664 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'2" disabled>';
665 print
' <label for="'.$val[
'id'].
'2">'.$val[
'label'].
'</label>';
666 print
' <span class="opacitymedium">('.$langs->trans(
"NotAvailable").
')</span>';
668 print
' ';
676print
'<div class="center">';
677print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"GenerateBackup").
'" id="buttonGo" /><br>';
683print
'<div id="backupfileright" class="fichehalfright">';
685$filearray =
dol_dir_list($conf->admin->dir_output.
'/documents',
'files', 0,
'',
'', $sortfield, (strtolower($sortorder) ==
'asc' ? SORT_ASC : SORT_DESC), 1);
686$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;"');
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
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_now($mode='auto')
Return date for now.
dol_escape_js($stringtoescape, $mode=0, $noescapebackslashn=0)
Returns text escaped for inclusion into javascript code.
ajax_autoselect($htmlname, $addlink='', $textonlink='Link')
Make content of an input box selected when we click into input field.
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_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
getDolGlobalString($key, $default='')
Return 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.