27require
'../../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
34$action =
GETPOST(
'action',
'aZ09');
36$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
37$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
45if (empty($page) || $page == -1) {
49$offset = $limit * $page;
60if ($action ==
'deletefile') {
61 if (preg_match(
'/^backup\//',
GETPOST(
'urlfile',
'alpha'))) {
62 $file = $conf->admin->dir_output.
'/backup/'.basename(
GETPOST(
'urlfile',
'alpha'));
70 $file = $conf->admin->dir_output.
'/documents/'.basename(
GETPOST(
'urlfile',
'alpha'));
93$help_url =
'EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad';
94llxHeader(
'',
'', $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-tools_dolibarr_export');
96print
'<script type="text/javascript">
97jQuery(document).ready(function() {';
100 function hideoptions () {
101 jQuery(
"#mysql_options").hide();
102 jQuery(
"#mysql_nobin_options").hide();
103 jQuery(
"#postgresql_options").hide();
107 jQuery(
"#radio_dump_mysql").click(
function() {
109 jQuery(
"#mysql_options").show();
111 jQuery(
"#radio_dump_mysql_nobin").click(
function() {
113 jQuery(
"#mysql_nobin_options").show();
115 jQuery(
"#radio_dump_postgresql").click(
function() {
117 jQuery(
"#postgresql_options").show();
119 jQuery(
"#select_sql_compat").click(
function() {
120 if (jQuery(
"#select_sql_compat").val() ==
'POSTGRESQL')
122 jQuery(
"#checkbox_dump_disable-add-locks").prop(
'checked',
true);
127if (in_array($type, array(
'mysql',
'mysqli'))) {
128 print
'jQuery("#radio_dump_mysql").click();';
130if (in_array($type, array(
'pgsql'))) {
131 print
'jQuery("#radio_dump_postgresql").click();';
136$title = $langs->trans(
"Backup");
141print
'<div class="center">';
142print $langs->trans(
"BackupDesc", DOL_DATA_ROOT);
146print
"<!-- Dump of a server -->\n";
147print
'<form method="post" action="export.php" name="dump">';
148print
'<input type="hidden" name="token" value="'.newToken().
'" />';
149print
'<input type="hidden" name="export_type" value="server" />';
150print
'<input type="hidden" name="page_y" value="" />';
152print
'<fieldset id="fieldsetexport"><legend class="legendforfieldsetstep" style="font-size: 3em">1</legend>';
154print
'<span class="opacitymedium">';
155print $langs->trans(
"BackupDesc3", $dolibarr_main_db_name).
'<br>';
161print
'<div id="backupdatabaseleft" class="fichehalfleft" >';
163$title = $langs->trans(
"BackupDumpWizard");
170print
'<span class="opacitymedium">'.$langs->trans(
"DatabaseName").
' : </span><b>'.$dolibarr_main_db_name.
'</b><br><br>';
175print
'<table class="centpercent noborderbottom">';
178print
'<td class="tdtop nopaddingleftimp">';
180print
'<div id="div_container_exportoptions">';
181print
'<fieldset id="exportoptions"><legend>'.$langs->trans(
"ExportMethod").
'</legend>';
182if (in_array($type, array(
'mysql',
'mysqli'))) {
183 print
'<div class="formelementrow"><input type="radio" name="what" value="mysql" id="radio_dump_mysql" />';
184 print
'<label for="radio_dump_mysql">MySQL Dump (mysqldump)</label>';
187 print
'<div class="formelementrow"><input type="radio" name="what" value="mysqlnobin" id="radio_dump_mysql_nobin" />';
188 print
'<label for="radio_dump_mysql_nobin">MySQL Dump (php) '.img_warning($langs->trans(
'BackupPHPWarning')).
'</label>';
190} elseif (in_array($type, array(
'pgsql'))) {
191 print
'<div class="formelementrow"><input type="radio" name="what" value="postgresql" id="radio_dump_postgresql" />';
192 print
'<label for="radio_dump_postgresql">PostgreSQL Dump (pg_dump)</label>';
195 print
'No method available with database '.dol_escape_htmltag($label);
204print
'<td class="tdtop nopaddingleftimp">';
206print
'<div class="centpercent center margintoponly marginbottomonly">';
207print
img_picto(
'',
'setup',
'class="pictofixedwidth"').
'<a class="classlink" id="lnk">'.$langs->trans(
"ShowAdvancedOptions").
'...</a>';
210print
'<script type="text/javascript">
211jQuery(document).ready(function() {
212 jQuery("#lnk").click(function() {
213 console.log("We click on link");
218function hideoptions(domelem) {
219 const div = document.getElementById("div_container_sub_exportoptions");
221 if (div.style.display === "none") {
222 div.style.display = "block";
223 domelem.innerText="'.dol_escape_js($langs->transnoentitiesnoconv(
"HideAdvancedoptions")).
'";
225 div.style.display = "none";
226 domelem.innerText="'.
dol_escape_js($langs->transnoentitiesnoconv(
"ShowAdvancedOptions")).
'...";
232print
'<div id="div_container_sub_exportoptions" style="display: none;">';
234if (in_array($type, array(
'mysql',
'mysqli'))) {
235 print
"<!-- Fieldset mysqldump -->\n";
236 print
'<fieldset id="mysql_options">';
238 print
'<fieldset class="formelementrow"><legend>'.$langs->trans(
"FullPathToMysqldumpCommand").
'</legend>';
240 $fullpathofmysqldump = $db->getPathOfDump();
244 print
'<input type="text" name="mysqldump" style="width: 80%" value="'.$fullpathofmysqldump.
'">';
248 print
'<fieldset><legend>'.$langs->trans(
"ExportOptions").
'</legend>';
251 print
'<div class="formelementrow">';
252 print
'<input type="checkbox" name="disable_fk" value="yes" id="checkbox_disable_fk" checked>';
253 print
'<label for="checkbox_disable_fk">'.$langs->trans(
"CommandsToDisableForeignKeysForImport").
' '.
img_info($langs->trans(
'CommandsToDisableForeignKeysForImportWarning')).
'</label>';
257 print
'<label for="select_sql_compat">'.$langs->trans(
"ExportCompatibility").
'</label>';
259 print
'<select name="sql_compat" id="select_sql_compat" class="flat">';
260 print
'<option value="NONE" selected>NONE</option>';
261 print
'<option value="ANSI">ANSI</option>';
262 print
'<option value="DB2">DB2</option>';
263 print
'<option value="MAXDB">MAXDB</option>';
264 print
'<option value="MYSQL323">MYSQL323</option>';
265 print
'<option value="MYSQL40">MYSQL40</option>';
266 print
'<option value="MSSQL">MSSQL</option>';
267 print
'<option value="ORACLE">ORACLE</option>';
268 print
'<option value="POSTGRESQL">POSTGRESQL</option>';
272 print
'<div class="formelementrow">';
273 print
'<input type="checkbox" name="use_transaction" value="yes" id="checkbox_use_transaction" checked="checked">';
274 print
'<label for="checkbox_use_transaction">'.$langs->trans(
"UseTransactionnalMode").
'</label>';
277 print
'<input type="checkbox" name="use_mysql_quick_param" value="yes" id="checkbox_use_quick" checked="checked" />';
278 print
'<label for="checkbox_use_quick">';
279 print $form->textwithpicto($langs->trans(
'ExportUseMySQLQuickParameter'), $langs->trans(
'ExportUseMySQLQuickParameterHelp'));
283 print
'<input type="checkbox" name="use_force" value="no" id="checkbox_use_force" />';
284 print
'<label for="checkbox_use_force">';
285 print $form->textwithpicto($langs->trans(
'ExportUseForce'), $langs->trans(
'ExportUseForceHelp'));
293 if (empty($execmethod)) {
296 if ($execmethod == 1) {
298 print
'<input type="checkbox" name="lowmemorydump" value="yes" id="lowmemorydump"'.((GETPOSTISSET(
'lowmemorydump') ?
GETPOST(
'lowmemorydump',
'alpha') :
getDolGlobalString(
'MAIN_LOW_MEMORY_DUMP')) ?
' checked="checked"' :
'').
'" />';
299 print
'<label for="lowmemorydump">';
300 print $form->textwithpicto($langs->trans(
'ExportUseLowMemoryMode'), $langs->trans(
'ExportUseLowMemoryModeHelp'));
305 print
'<!-- <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" />';
306 print
'<label for="checkbox_drop_database">'.$langs->trans(
"AddDropDatabase").
'</label>';
313 print
'<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" checked />';
314 print
'<label for="checkbox_sql_structure">'.$langs->trans(
'ExportStructure').
'</label>';
317 print
'<input type="checkbox" name="drop"'.((!GETPOSTISSET(
"drop") ||
GETPOST(
'drop')) ?
' checked' :
'').
' id="checkbox_dump_drop" />';
318 print
'<label for="checkbox_dump_drop">'.$langs->trans(
"AddDropTable").
'</label>';
325 print
'<input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" checked />';
326 print
'<label for="checkbox_sql_data">'.$langs->trans(
"Datas").
'</label>';
328 print
'<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" checked />';
329 print
'<label for="checkbox_dump_showcolumns">'.$langs->trans(
"NameColumn").
'</label>';
332 print
'<input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" checked />';
333 print
'<label for="checkbox_dump_extended_ins">'.$langs->trans(
"ExtendedInsert").
'</label>';
336 print
'<input type="checkbox" name="disable-add-locks" value="no" id="checkbox_dump_disable-add-locks" />';
337 print
'<label for="checkbox_dump_disable-add-locks">'.$langs->trans(
"NoLockBeforeInsert").
'</label>';
340 print
'<input type="checkbox" name="delayed" value="yes" id="checkbox_dump_delayed" />';
341 print
'<label for="checkbox_dump_delayed">'.$langs->trans(
"DelayedInsert").
'</label>';
344 print
'<input type="checkbox" name="sql_ignore" value="yes" id="checkbox_dump_ignore" />';
345 print
'<label for="checkbox_dump_ignore">'.$langs->trans(
"IgnoreDuplicateRecords").
'</label>';
348 print
'<input type="checkbox" name="hexforbinary" value="yes" id="checkbox_hexforbinary" checked />';
349 print
'<label for="checkbox_hexforbinary">'.$langs->trans(
"EncodeBinariesInHexa").
'</label>';
352 print
'<input type="checkbox" name="charset_utf8" value="yes" id="checkbox_charset_utf8" checked disabled />';
353 print
'<label for="checkbox_charset_utf8">'.$langs->trans(
"UTF8").
'</label>';
360 print
"<!-- Fieldset mysql_nobin -->\n";
361 print
'<fieldset id="mysql_nobin_options">';
364 print
'<legend>'.$langs->trans(
"ExportOptions").
'</legend>';
366 print
'<div class="formelementrow">';
367 print
'<input type="checkbox" name="nobin_use_transaction" value="yes" id="checkbox_use_transaction" />';
368 print
'<label for="checkbox_use_transaction">'.$langs->trans(
"UseTransactionnalMode").
'</label>';
372 print
'<div class="formelementrow">';
373 print
'<input type="checkbox" name="nobin_disable_fk" value="yes" id="checkbox_disable_fk" checked />';
374 print
'<label for="checkbox_disable_fk">'.$langs->trans(
"CommandsToDisableForeignKeysForImport").
' '.
img_info($langs->trans(
'CommandsToDisableForeignKeysForImportWarning')).
'</label>';
380 print
'<fieldset><legend>'.$langs->trans(
'ExportStructure').
'</legend>';
381 print
'<input type="checkbox" name="nobin_drop"'.((!GETPOSTISSET(
"nobin_drop") ||
GETPOST(
'nobin_drop')) ?
' checked' :
'').
' id="checkbox_dump_drop" />';
382 print
'<label for="checkbox_dump_drop">'.$langs->trans(
"AddDropTable").
'</label>';
388 print
'<legend>'.$langs->trans(
"Datas").
'</legend>';
390 print
'<input type="checkbox" name="nobin_nolocks" value="no" id="checkbox_dump_disable-add-locks" />';
391 print
'<label for="checkbox_dump_disable-add-locks">'.$langs->trans(
"NoLockBeforeInsert").
'</label>';
394 print
'<input type="checkbox" name="nobin_delayed" value="yes" id="checkbox_dump_delayed" />';
395 print
'<label for="checkbox_dump_delayed">'.$langs->trans(
"DelayedInsert").
'</label>';
398 print
'<input type="checkbox" name="nobin_sql_ignore" value="yes" id="checkbox_dump_ignore" />';
399 print
'<label for="checkbox_dump_ignore">'.$langs->trans(
"IgnoreDuplicateRecords").
'</label>';
402 print
'<input type="checkbox" name="nobin_charset_utf8" value="yes" id="checkbox_charset_utf8" checked disabled />';
403 print
'<label for="checkbox_charset_utf8">'.$langs->trans(
"UTF8").
'</label>';
410if (in_array($type, array(
'pgsql'))) {
411 print
"<!-- Fieldset pg_dump -->\n";
412 print
'<fieldset id="postgresql_options">';
415 print
'<fieldset class="formelementrow"><legend>'.$langs->trans(
"FullPathToPostgreSQLdumpCommand").
'</legend>';
417 $fullpathofpgdump = $db->getPathOfDump();
422 print
'<input type="text" name="postgresqldump" style="width: 80%" value="'.$fullpathofpgdump.
'" />';
427 print
'<legend>'.$langs->trans(
"ExportOptions").
'</legend>';
428 print
'<label for="select_sql_compat">'.$langs->trans(
"ExportCompatibility").
'</label>';
429 print
'<select name="sql_compat" id="select_sql_compat" class="flat">';
430 print
'<option value="POSTGRESQL" selected>POSTGRESQL</option>';
431 print
'<option value="ANSI">ANSI</option>';
434 print
'<!-- <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" />';
435 print
'<label for="checkbox_drop_database">'.$langs->trans(
"AddDropDatabase").
'</label>';
441 print
'<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" checked />';
442 print
'<label for="checkbox_sql_structure">'.$langs->trans(
'ExportStructure').
'</label>';
448 print
'<input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" checked />';
449 print
'<label for="checkbox_sql_data">'.$langs->trans(
"Datas").
'</label>';
451 print
'<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" checked />';
452 print
'<label for="checkbox_dump_showcolumns">'.$langs->trans(
"NameColumn").
'</label>';
466print
'<!--<fieldset>';
467print
'<legend>'.$langs->trans(
"Destination").
'</legend> -->';
469print
'<label for="filename_template" class="line-height-large opacitymedium">'.$langs->trans(
"FileNameToGenerate").
'</label>';
473if (in_array($type, array(
'mysql',
'mysqli'))) {
474 $prefix =
'mysqldump';
481if (in_array($type, array(
'pgsql'))) {
486print
'<input type="text" name="filename_template" style="width: 90%" id="filename_template" value="'.$file.
'" />';
491$compression = array();
492if (in_array($type, array(
'mysql',
'mysqli'))) {
493 $compression[
'gz'] = array(
494 'function' =>
'gzopen',
495 'id' =>
'radio_compression_gzip',
496 'label' => $langs->trans(
"Gzip")
504 $compression[
'bz'] = array(
505 'function' =>
'bzopen',
506 'id' =>
'radio_compression_bzip',
507 'label' => $langs->trans(
"Bzip2")
509 $compression[
'zstd'] = array(
510 'function' =>
'zstd_compress',
511 'id' =>
'radio_compression_zstd',
512 'label' => $langs->trans(
"Zstd")
514 $compression[
'none'] = array(
516 'id' =>
'radio_compression_none',
517 'label' => $langs->trans(
"None")
520 $compression[
'none'] = array(
522 'id' =>
'radio_compression_none',
523 'label' => $langs->trans(
"None")
525 $compression[
'gz'] = array(
526 'function' =>
'gzopen',
527 'id' =>
'radio_compression_gzip',
528 'label' => $langs->trans(
"Gzip")
533print
'<div class="formelementrow">';
536print $langs->trans(
"Compression").
': ';
539foreach ($compression as $key => $val) {
540 if (!$val[
'function'] || function_exists($val[
'function'])) {
544 $checked =
' checked';
546 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'"'.$checked.
'>';
547 print
' <label for="'.$val[
'id'].
'">'.$val[
'label'].
'</label>';
550 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'" disabled>';
551 print
' <label for="'.$val[
'id'].
'">'.$val[
'label'].
'</label>';
552 print
' <span class="opacitymedium">('.$langs->trans(
"NotAvailable").
')</span>';
554 print
' ';
561print
"<!--</fieldset>--> <!-- End destination -->\n";
564print
'<div class="center">';
565print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"GenerateBackup").
'" id="buttonGo">';
569if (!empty($_SESSION[
"commandbackuplastdone"])) {
570 print
'<br><b>'.$langs->trans(
"RunCommandSummary").
':</b><br>'.
"\n";
571 print
'<textarea rows="'.ROWS_2.
'" class="centpercent">'.$_SESSION[
"commandbackuplastdone"].
'</textarea><br>'.
"\n";
577 print
'<b>'.$langs->trans(
"BackupResult").
':</b> ';
578 print $_SESSION[
"commandbackupresult"];
580 $_SESSION[
"commandbackuplastdone"] =
'';
581 $_SESSION[
"commandbackuptorun"] =
'';
582 $_SESSION[
"commandbackupresult"] =
'';
584if (!empty($_SESSION[
"commandbackuptorun"])) {
585 print
'<br><span class="warning">'.$langs->trans(
"YouMustRunCommandFromCommandLineAfterLoginToUser", $dolibarr_main_db_user, $dolibarr_main_db_user).
':</span><br>'.
"\n";
586 print
'<textarea id="commandbackuptoruntext" rows="'.ROWS_2.
'" class="centpercent">'.$_SESSION[
"commandbackuptorun"].
'</textarea><br>'.
"\n";
592 $_SESSION[
"commandbackuplastdone"] =
'';
593 $_SESSION[
"commandbackuptorun"] =
'';
594 $_SESSION[
"commandbackupresult"] =
'';
597print
"</div> <!-- end div center button -->\n";
602print
"</div> <!-- end div fichehalfleft -->\n";
605print
'<div id="backupdatabaseright" class="fichehalfright">';
607$filearray =
dol_dir_list($conf->admin->dir_output.
'/backup',
'files', 0,
'',
'', $sortfield, (strtolower($sortorder) ==
'asc' ? SORT_ASC : SORT_DESC), 1);
608$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;"');
616$title = $langs->trans(
"BackupZipWizard");
619print
"<!-- Dump of a server -->\n";
621print
'<form method="post" action="export_files.php" name="dump">';
622print
'<input type="hidden" name="token" value="'.newToken().
'" />';
623print
'<input type="hidden" name="export_type" value="server" />';
624print
'<input type="hidden" name="page_y" value="" />';
626print
'<fieldset><legend class="legendforfieldsetstep" style="font-size: 3em">2</legend>';
628print
'<span class="opacitymedium">';
629print $langs->trans(
"BackupDesc2", DOL_DATA_ROOT).
'<br>';
630print $langs->trans(
"BackupDescX").
'<br><br>';
633print
'<div id="backupfilesleft" class="fichehalfleft">';
637print
'<label for="zipfilename_template" class="line-height-large paddingbottom opacitymedium">'.$langs->trans(
"FileNameToGenerate").
'</label><br>';
638$prefix =
'documents';
641print
'<input type="text" name="zipfilename_template" style="width: 90%" id="zipfilename_template" value="'.$file.
'" /> <br>';
647print
'<div class="formelementrow">';
650print $langs->trans(
"Compression").
': ';
651$filecompression = $compression;
652unset($filecompression[
'none']);
653$filecompression[
'zip'] = array(
'function' =>
'dol_compress_dir',
'id' =>
'radio_compression_zip',
'label' => $langs->trans(
"FormatZip"));
656foreach ($filecompression as $key => $val) {
657 if (!$val[
'function'] || function_exists($val[
'function'])) {
660 $checked =
' checked';
662 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'2"'.$checked.
'>';
663 print
' <label for="'.$val[
'id'].
'2">'.$val[
'label'].
'</label>';
665 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'2" disabled>';
666 print
' <label for="'.$val[
'id'].
'2">'.$val[
'label'].
'</label>';
667 print
' <span class="opacitymedium">('.$langs->trans(
"NotAvailable").
')</span>';
669 print
' ';
677print
'<div class="center">';
678print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"GenerateBackup").
'" id="buttonGo" /><br>';
684print
'<div id="backupfileright" class="fichehalfright">';
686$filearray =
dol_dir_list($conf->admin->dir_output.
'/documents',
'files', 0,
'',
'', $sortfield, (strtolower($sortorder) ==
'asc' ? SORT_ASC : SORT_DESC), 1);
687$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($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.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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)
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.
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.
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.