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';
42$action =
GETPOST(
'action',
'aZ09');
44$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
45$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
53if (empty($page) || $page == -1) {
57$offset = $limit * $page;
68if ($action ==
'deletefile') {
69 if (preg_match(
'/^backup\//',
GETPOST(
'urlfile',
'alpha'))) {
70 $file =
$conf->admin->dir_output.
'/backup/'.basename(
GETPOST(
'urlfile',
'alpha'));
78 $file =
$conf->admin->dir_output.
'/documents/'.basename(
GETPOST(
'urlfile',
'alpha'));
101$help_url =
'EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad';
102llxHeader(
'',
'', $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-tools_dolibarr_export');
104print
'<script type="text/javascript">
105jQuery(document).ready(function() {';
108 function hideoptions () {
109 jQuery(
"#mysql_options").hide();
110 jQuery(
"#mysql_nobin_options").hide();
111 jQuery(
"#postgresql_options").hide();
115 jQuery(
"#radio_dump_mysql").click(
function() {
117 jQuery(
"#mysql_options").show();
119 jQuery(
"#radio_dump_mysql_nobin").click(
function() {
121 jQuery(
"#mysql_nobin_options").show();
123 jQuery(
"#radio_dump_postgresql").click(
function() {
125 jQuery(
"#postgresql_options").show();
127 jQuery(
"#select_sql_compat").click(
function() {
128 if (jQuery(
"#select_sql_compat").val() ==
'POSTGRESQL')
130 jQuery(
"#checkbox_dump_disable-add-locks").prop(
'checked',
true);
135if (in_array($type, array(
'mysql',
'mysqli'))) {
136 print
'jQuery("#radio_dump_mysql").click();';
138if (in_array($type, array(
'pgsql'))) {
139 print
'jQuery("#radio_dump_postgresql").click();';
144$title = $langs->trans(
"Backup");
149print
'<div class="center">';
150print $langs->trans(
"BackupDesc", DOL_DATA_ROOT);
154print
"<!-- Dump of a server -->\n";
155print
'<form method="post" action="export.php" name="dump">';
156print
'<input type="hidden" name="token" value="'.newToken().
'" />';
157print
'<input type="hidden" name="export_type" value="server" />';
158print
'<input type="hidden" name="page_y" value="" />';
160print
'<fieldset id="fieldsetexport"><legend class="legendforfieldsetstep" style="font-size: 3em">1</legend>';
162print
'<span class="opacitymedium">';
163print $langs->trans(
"BackupDesc3", $dolibarr_main_db_name).
'<br>';
169print
'<div id="backupdatabaseleft" class="fichehalfleft" >';
171$title = $langs->trans(
"BackupDumpWizard");
178print
'<span class="opacitymedium">'.$langs->trans(
"DatabaseName").
' : </span><b>'.$dolibarr_main_db_name.
'</b><br><br>';
183print
'<table class="centpercent noborderbottom">';
186print
'<td class="tdtop nopaddingleftimp">';
188print
'<div id="div_container_exportoptions">';
189print
'<fieldset id="exportoptions"><legend>'.$langs->trans(
"ExportMethod").
'</legend>';
190if (in_array($type, array(
'mysql',
'mysqli'))) {
191 print
'<div class="formelementrow"><input type="radio" name="what" value="mysql" id="radio_dump_mysql" />';
192 print
'<label for="radio_dump_mysql">MySQL Dump (mysqldump)</label>';
195 print
'<div class="formelementrow"><input type="radio" name="what" value="mysqlnobin" id="radio_dump_mysql_nobin" />';
196 print
'<label for="radio_dump_mysql_nobin">MySQL Dump (php) '.img_warning($langs->trans(
'BackupPHPWarning')).
'</label>';
198} elseif (in_array($type, array(
'pgsql'))) {
199 print
'<div class="formelementrow"><input type="radio" name="what" value="postgresql" id="radio_dump_postgresql" />';
200 print
'<label for="radio_dump_postgresql">PostgreSQL Dump (pg_dump)</label>';
203 print
'No method available with database '.dol_escape_htmltag($label);
212print
'<td class="tdtop nopaddingleftimp">';
214print
'<div class="centpercent center margintoponly marginbottomonly">';
215print
img_picto(
'',
'setup',
'class="pictofixedwidth"').
'<a class="classlink" id="lnk">'.$langs->trans(
"ShowAdvancedOptions").
'...</a>';
218print
'<script type="text/javascript">
219jQuery(document).ready(function() {
220 jQuery("#lnk").click(function() {
221 console.log("We click on link");
226function hideoptions(domelem) {
227 const div = document.getElementById("div_container_sub_exportoptions");
229 if (div.style.display === "none") {
230 div.style.display = "block";
231 domelem.innerText="'.dol_escape_js($langs->transnoentitiesnoconv(
"HideAdvancedoptions")).
'";
233 div.style.display = "none";
234 domelem.innerText="'.
dol_escape_js($langs->transnoentitiesnoconv(
"ShowAdvancedOptions")).
'...";
240print
'<div id="div_container_sub_exportoptions" style="display: none;">';
242if (in_array($type, array(
'mysql',
'mysqli'))) {
243 print
"<!-- Fieldset mysqldump -->\n";
244 print
'<fieldset id="mysql_options">';
246 print
'<fieldset class="formelementrow"><legend>'.$langs->trans(
"FullPathToMysqldumpCommand").
'</legend>';
248 $fullpathofmysqldump = $db->getPathOfDump();
252 print
'<input type="text" name="mysqldump" style="width: 80%" value="'.$fullpathofmysqldump.
'">';
256 print
'<fieldset><legend>'.$langs->trans(
"ExportOptions").
'</legend>';
259 print
'<div class="formelementrow">';
260 print
'<input type="checkbox" name="disable_fk" value="yes" id="checkbox_disable_fk" checked>';
261 print
'<label for="checkbox_disable_fk">'.$langs->trans(
"CommandsToDisableForeignKeysForImport").
' '.
img_info($langs->trans(
'CommandsToDisableForeignKeysForImportWarning')).
'</label>';
265 print
'<label for="select_sql_compat">'.$langs->trans(
"ExportCompatibility").
'</label>';
267 print
'<select name="sql_compat" id="select_sql_compat" class="flat">';
268 print
'<option value="NONE" selected>NONE</option>';
269 print
'<option value="ANSI">ANSI</option>';
270 print
'<option value="DB2">DB2</option>';
271 print
'<option value="MAXDB">MAXDB</option>';
272 print
'<option value="MYSQL323">MYSQL323</option>';
273 print
'<option value="MYSQL40">MYSQL40</option>';
274 print
'<option value="MSSQL">MSSQL</option>';
275 print
'<option value="ORACLE">ORACLE</option>';
276 print
'<option value="POSTGRESQL">POSTGRESQL</option>';
280 print
'<div class="formelementrow">';
281 print
'<input type="checkbox" name="use_transaction" value="yes" id="checkbox_use_transaction" checked="checked">';
282 print
'<label for="checkbox_use_transaction">'.$langs->trans(
"UseTransactionnalMode").
'</label>';
285 print
'<input type="checkbox" name="use_mysql_quick_param" value="yes" id="checkbox_use_quick" checked="checked" />';
286 print
'<label for="checkbox_use_quick">';
287 print $form->textwithpicto($langs->trans(
'ExportUseMySQLQuickParameter'), $langs->trans(
'ExportUseMySQLQuickParameterHelp'));
291 print
'<input type="checkbox" name="use_force" value="no" id="checkbox_use_force" />';
292 print
'<label for="checkbox_use_force">';
293 print $form->textwithpicto($langs->trans(
'ExportUseForce'), $langs->trans(
'ExportUseForceHelp'));
301 if (empty($execmethod)) {
304 if ($execmethod == 1) {
306 print
'<input type="checkbox" name="lowmemorydump" value="yes" id="lowmemorydump"'.((GETPOSTISSET(
'lowmemorydump') ?
GETPOST(
'lowmemorydump',
'alpha') :
getDolGlobalString(
'MAIN_LOW_MEMORY_DUMP')) ?
' checked="checked"' :
'').
'" />';
307 print
'<label for="lowmemorydump">';
308 print $form->textwithpicto($langs->trans(
'ExportUseLowMemoryMode'), $langs->trans(
'ExportUseLowMemoryModeHelp'));
313 print
'<!-- <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" />';
314 print
'<label for="checkbox_drop_database">'.$langs->trans(
"AddDropDatabase").
'</label>';
321 print
'<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" checked />';
322 print
'<label for="checkbox_sql_structure">'.$langs->trans(
'ExportStructure').
'</label>';
325 print
'<input type="checkbox" name="drop"'.((!GETPOSTISSET(
"drop") ||
GETPOST(
'drop')) ?
' checked' :
'').
' id="checkbox_dump_drop" />';
326 print
'<label for="checkbox_dump_drop">'.$langs->trans(
"AddDropTable").
'</label>';
333 print
'<input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" checked />';
334 print
'<label for="checkbox_sql_data">'.$langs->trans(
"Datas").
'</label>';
336 print
'<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" checked />';
337 print
'<label for="checkbox_dump_showcolumns">'.$langs->trans(
"NameColumn").
'</label>';
340 print
'<input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" checked />';
341 print
'<label for="checkbox_dump_extended_ins">'.$langs->trans(
"ExtendedInsert").
'</label>';
344 print
'<input type="checkbox" name="disable-add-locks" value="no" id="checkbox_dump_disable-add-locks" />';
345 print
'<label for="checkbox_dump_disable-add-locks">'.$langs->trans(
"NoLockBeforeInsert").
'</label>';
348 print
'<input type="checkbox" name="delayed" value="yes" id="checkbox_dump_delayed" />';
349 print
'<label for="checkbox_dump_delayed">'.$langs->trans(
"DelayedInsert").
'</label>';
352 print
'<input type="checkbox" name="sql_ignore" value="yes" id="checkbox_dump_ignore" />';
353 print
'<label for="checkbox_dump_ignore">'.$langs->trans(
"IgnoreDuplicateRecords").
'</label>';
356 print
'<input type="checkbox" name="hexforbinary" value="yes" id="checkbox_hexforbinary" checked />';
357 print
'<label for="checkbox_hexforbinary">'.$langs->trans(
"EncodeBinariesInHexa").
'</label>';
360 print
'<input type="checkbox" name="charset_utf8" value="yes" id="checkbox_charset_utf8" checked disabled />';
361 print
'<label for="checkbox_charset_utf8">'.$langs->trans(
"UTF8").
'</label>';
368 print
"<!-- Fieldset mysql_nobin -->\n";
369 print
'<fieldset id="mysql_nobin_options">';
372 print
'<legend>'.$langs->trans(
"ExportOptions").
'</legend>';
374 print
'<div class="formelementrow">';
375 print
'<input type="checkbox" name="nobin_use_transaction" value="yes" id="checkbox_use_transaction" />';
376 print
'<label for="checkbox_use_transaction">'.$langs->trans(
"UseTransactionnalMode").
'</label>';
380 print
'<div class="formelementrow">';
381 print
'<input type="checkbox" name="nobin_disable_fk" value="yes" id="checkbox_disable_fk" checked />';
382 print
'<label for="checkbox_disable_fk">'.$langs->trans(
"CommandsToDisableForeignKeysForImport").
' '.
img_info($langs->trans(
'CommandsToDisableForeignKeysForImportWarning')).
'</label>';
388 print
'<fieldset><legend>'.$langs->trans(
'ExportStructure').
'</legend>';
389 print
'<input type="checkbox" name="nobin_drop"'.((!GETPOSTISSET(
"nobin_drop") ||
GETPOST(
'nobin_drop')) ?
' checked' :
'').
' id="checkbox_dump_drop" />';
390 print
'<label for="checkbox_dump_drop">'.$langs->trans(
"AddDropTable").
'</label>';
396 print
'<legend>'.$langs->trans(
"Datas").
'</legend>';
398 print
'<input type="checkbox" name="nobin_nolocks" value="no" id="checkbox_dump_disable-add-locks" />';
399 print
'<label for="checkbox_dump_disable-add-locks">'.$langs->trans(
"NoLockBeforeInsert").
'</label>';
402 print
'<input type="checkbox" name="nobin_delayed" value="yes" id="checkbox_dump_delayed" />';
403 print
'<label for="checkbox_dump_delayed">'.$langs->trans(
"DelayedInsert").
'</label>';
406 print
'<input type="checkbox" name="nobin_sql_ignore" value="yes" id="checkbox_dump_ignore" />';
407 print
'<label for="checkbox_dump_ignore">'.$langs->trans(
"IgnoreDuplicateRecords").
'</label>';
410 print
'<input type="checkbox" name="nobin_charset_utf8" value="yes" id="checkbox_charset_utf8" checked disabled />';
411 print
'<label for="checkbox_charset_utf8">'.$langs->trans(
"UTF8").
'</label>';
418if (in_array($type, array(
'pgsql'))) {
419 print
"<!-- Fieldset pg_dump -->\n";
420 print
'<fieldset id="postgresql_options">';
423 print
'<fieldset class="formelementrow"><legend>'.$langs->trans(
"FullPathToPostgreSQLdumpCommand").
'</legend>';
425 $fullpathofpgdump = $db->getPathOfDump();
430 print
'<input type="text" name="postgresqldump" style="width: 80%" value="'.$fullpathofpgdump.
'" />';
435 print
'<legend>'.$langs->trans(
"ExportOptions").
'</legend>';
436 print
'<label for="select_sql_compat">'.$langs->trans(
"ExportCompatibility").
'</label>';
437 print
'<select name="sql_compat" id="select_sql_compat" class="flat">';
438 print
'<option value="POSTGRESQL" selected>POSTGRESQL</option>';
439 print
'<option value="ANSI">ANSI</option>';
442 print
'<!-- <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" />';
443 print
'<label for="checkbox_drop_database">'.$langs->trans(
"AddDropDatabase").
'</label>';
449 print
'<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" checked />';
450 print
'<label for="checkbox_sql_structure">'.$langs->trans(
'ExportStructure').
'</label>';
456 print
'<input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" checked />';
457 print
'<label for="checkbox_sql_data">'.$langs->trans(
"Datas").
'</label>';
459 print
'<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" checked />';
460 print
'<label for="checkbox_dump_showcolumns">'.$langs->trans(
"NameColumn").
'</label>';
474print
'<!--<fieldset>';
475print
'<legend>'.$langs->trans(
"Destination").
'</legend> -->';
477print
'<label for="filename_template" class="line-height-large opacitymedium">'.$langs->trans(
"FileNameToGenerate").
'</label>';
481if (in_array($type, array(
'mysql',
'mysqli'))) {
482 $prefix =
'mysqldump';
489if (in_array($type, array(
'pgsql'))) {
494print
'<input type="text" name="filename_template" style="width: 90%" id="filename_template" value="'.$file.
'" />';
499$compression = array();
500if (in_array($type, array(
'mysql',
'mysqli'))) {
501 $compression[
'gz'] = array(
502 'function' =>
'gzopen',
503 'id' =>
'radio_compression_gzip',
504 'label' => $langs->trans(
"Gzip")
512 $compression[
'bz'] = array(
513 'function' =>
'bzopen',
514 'id' =>
'radio_compression_bzip',
515 'label' => $langs->trans(
"Bzip2")
517 $compression[
'zstd'] = array(
518 'function' =>
'zstd_compress',
519 'id' =>
'radio_compression_zstd',
520 'label' => $langs->trans(
"Zstd")
522 $compression[
'none'] = array(
524 'id' =>
'radio_compression_none',
525 'label' => $langs->trans(
"None")
528 $compression[
'none'] = array(
530 'id' =>
'radio_compression_none',
531 'label' => $langs->trans(
"None")
533 $compression[
'gz'] = array(
534 'function' =>
'gzopen',
535 'id' =>
'radio_compression_gzip',
536 'label' => $langs->trans(
"Gzip")
541print
'<div class="formelementrow">';
544print $langs->trans(
"Compression").
': ';
547foreach ($compression as $key => $val) {
548 if (!$val[
'function'] || function_exists($val[
'function'])) {
552 $checked =
' checked';
554 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'"'.$checked.
'>';
555 print
' <label for="'.$val[
'id'].
'">'.$val[
'label'].
'</label>';
558 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'" disabled>';
559 print
' <label for="'.$val[
'id'].
'">'.$val[
'label'].
'</label>';
560 print
' <span class="opacitymedium">('.$langs->trans(
"NotAvailable").
')</span>';
562 print
' ';
569print
"<!--</fieldset>--> <!-- End destination -->\n";
572print
'<div class="center">';
573print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"GenerateBackup").
'" id="buttonGo">';
577if (!empty($_SESSION[
"commandbackuplastdone"])) {
578 print
'<br><b>'.$langs->trans(
"RunCommandSummary").
':</b><br>'.
"\n";
579 print
'<textarea rows="'.ROWS_2.
'" class="centpercent">'.$_SESSION[
"commandbackuplastdone"].
'</textarea><br>'.
"\n";
585 print
'<b>'.$langs->trans(
"BackupResult").
':</b> ';
586 print $_SESSION[
"commandbackupresult"];
588 $_SESSION[
"commandbackuplastdone"] =
'';
589 $_SESSION[
"commandbackuptorun"] =
'';
590 $_SESSION[
"commandbackupresult"] =
'';
592if (!empty($_SESSION[
"commandbackuptorun"])) {
593 print
'<br><span class="warning">'.$langs->trans(
"YouMustRunCommandFromCommandLineAfterLoginToUser", $dolibarr_main_db_user, $dolibarr_main_db_user).
':</span><br>'.
"\n";
594 print
'<textarea id="commandbackuptoruntext" rows="'.ROWS_2.
'" class="centpercent">'.$_SESSION[
"commandbackuptorun"].
'</textarea><br>'.
"\n";
600 $_SESSION[
"commandbackuplastdone"] =
'';
601 $_SESSION[
"commandbackuptorun"] =
'';
602 $_SESSION[
"commandbackupresult"] =
'';
605print
"</div> <!-- end div center button -->\n";
610print
"</div> <!-- end div fichehalfleft -->\n";
613print
'<div id="backupdatabaseright" class="fichehalfright">';
615$filearray =
dol_dir_list(
$conf->admin->dir_output.
'/backup',
'files', 0,
'',
'', $sortfield, (strtolower($sortorder) ==
'asc' ? SORT_ASC : SORT_DESC), 1);
616$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;"');
624$title = $langs->trans(
"BackupZipWizard");
627print
"<!-- Dump of a server -->\n";
629print
'<form method="post" action="export_files.php" name="dump">';
630print
'<input type="hidden" name="token" value="'.newToken().
'" />';
631print
'<input type="hidden" name="export_type" value="server" />';
632print
'<input type="hidden" name="page_y" value="" />';
634print
'<fieldset><legend class="legendforfieldsetstep" style="font-size: 3em">2</legend>';
636print
'<span class="opacitymedium">';
637print $langs->trans(
"BackupDesc2", DOL_DATA_ROOT).
'<br>';
638print $langs->trans(
"BackupDescX").
'<br><br>';
641print
'<div id="backupfilesleft" class="fichehalfleft">';
645print
'<label for="zipfilename_template" class="line-height-large paddingbottom opacitymedium">'.$langs->trans(
"FileNameToGenerate").
'</label><br>';
646$prefix =
'documents';
649print
'<input type="text" name="zipfilename_template" style="width: 90%" id="zipfilename_template" value="'.$file.
'" /> <br>';
655print
'<div class="formelementrow">';
658print $langs->trans(
"Compression").
': ';
659$filecompression = $compression;
660unset($filecompression[
'none']);
661$filecompression[
'zip'] = array(
'function' =>
'dol_compress_dir',
'id' =>
'radio_compression_zip',
'label' => $langs->trans(
"FormatZip"));
664foreach ($filecompression as $key => $val) {
665 if (!$val[
'function'] || function_exists($val[
'function'])) {
668 $checked =
' checked';
670 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'2"'.$checked.
'>';
671 print
' <label for="'.$val[
'id'].
'2">'.$val[
'label'].
'</label>';
673 print
'<input type="radio" name="compression" value="'.$key.
'" id="'.$val[
'id'].
'2" disabled>';
674 print
' <label for="'.$val[
'id'].
'2">'.$val[
'label'].
'</label>';
675 print
' <span class="opacitymedium">('.$langs->trans(
"NotAvailable").
')</span>';
677 print
' ';
685print
'<div class="center">';
686print
'<input type="submit" class="button reposition" value="'.$langs->trans(
"GenerateBackup").
'" id="buttonGo" /><br>';
692print
'<div id="backupfileright" class="fichehalfright">';
694$filearray =
dol_dir_list(
$conf->admin->dir_output.
'/documents',
'files', 0,
'',
'', $sortfield, (strtolower($sortorder) ==
'asc' ? SORT_ASC : SORT_DESC), 1);
695$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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.