* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * \file htdocs/admin/tools/dolibarr_export.php * \ingroup core * \brief Page to export database */ require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php"); $langs->load("admin"); $action=GETPOST('action'); $sortfield = GETPOST("sortfield"); $sortorder = GETPOST("sortorder"); $page = GETPOST("page"); if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="date"; if ($page < 0) { $page = 0; } $limit = $conf->liste_limit; $offset = $limit * $page; if (! $user->admin) accessforbidden(); /* * Actions */ if ($action == 'delete') { dol_delete_file($conf->admin->dir_output.'/backup/'.GETPOST('urlfile'),1); $action=''; } /* * View */ $form=new Form($db); $formfile = new FormFile($db); $help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad'; llxHeader('','',$help_url); ?> trans("Backup"),'','setup'); print $langs->trans("BackupDesc",DOL_DATA_ROOT).'

'; print $langs->trans("BackupDesc2",DOL_DATA_ROOT).'
'; print $langs->trans("BackupDescX").'

'; print $langs->trans("BackupDesc3",DOL_DATA_ROOT).'
'; print $langs->trans("BackupDescY").'

'; if ($_GET["msg"]) { print '
'.$_GET["msg"].'
'; print '
'; print "\n"; } $label=getStaticMember($db, 'label'); ?>
'.$langs->trans("DatabaseName").' : '.$dolibarr_main_db_name.''; ?>
trans("ExportMethod"); ?>
global->MAIN_FEATURES_LEVEL)) { ?>
trans("MySqlExportParameters"); ?>
trans("FullPathToMysqldumpCommand"); if (empty($conf->global->SYSTEMTOOLS_MYSQLDUMP)) { $fullpathofmysqldump=$db->getPathOfDump(); } else { $fullpathofmysqldump=$conf->global->SYSTEMTOOLS_MYSQLDUMP; } ?>

trans("ExportOptions"); ?>











trans("PostgreSqlExportParameters"); ?>
trans("FullPathToPostgreSQLdumpCommand"); if (empty($conf->global->SYSTEMTOOLS_POSTGRESQLDUMP)) { $fullpathofpgdump=$db->getPathOfDump(); } else { $fullpathofpgdump=$conf->global->SYSTEMTOOLS_POSTGRESQLDUMP; } ?>

trans("ExportOptions"); ?>



: " />

array('function' => '', 'id' => 'radio_compression_none', 'label' => $langs->trans("None")), // 'zip' => array('function' => 'zip_open', 'id' => 'radio_compression_zip', 'label' => $langs->trans("Zip")), Not open source 'gz' => array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip")), ); if ($label == 'MySQL') { $compression['bz']=array('function' => 'bzopen', 'id' => 'radio_compression_bzip', 'label' => $langs->trans("Bzip2")); } // Show compression choices print '
'; print "\n"; print $langs->trans("Compression").':   '; foreach($compression as $key => $val) { if (! $val['function'] || function_exists($val['function'])) // Enabled export format { print ''; print ' '; } else // Disabled export format { print ''; print ' '; print ' ('.$langs->trans("NotAvailable").')'; } print '     '; } print '
'; print "\n"; ?>
" id="buttonGo" />

admin->dir_output.'/backup','files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1); $result=$formfile->list_of_documents($filearray,null,'systemtools','',1,'backup/',1,0,$langs->trans("NoBackupFileAvailable"),0,$langs->trans("PreviousDumpFiles")); print '
'; llxFooter(); $db->close(); ?>