* * 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** * \file htdocs/admin/tools/dolibarr_import.php * \ingroup core * \brief Page to import database * \version $Id$ */ require("./pre.inc.php"); $langs->load("admin"); $langs->load("other"); if (! $user->admin) accessforbidden(); /* * View */ llxHeader('','','EN:Restores|FR:Restaurations|ES:Restauraciones'); print_fiche_titre($langs->trans("Restore"),'','setup'); print $langs->trans("RestoreDesc",DOL_DATA_ROOT).'

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

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

'; ?>
trans("DatabaseName").' : '.$dolibarr_main_db_name.'
'; print '
'; ?>
trans("ImportMethod"); ?>
onclick=" if (this.checked) { hide_them_all(); document.getElementById('mysql_options').style.display = 'block'; }; return true" />
label == 'MySQL') { ?>
Import MySql
getPathOfRestore(); if (preg_match("/\s/",$command)) $command=$command=escapeshellarg($command); // Use quotes on command $param=$dolibarr_main_db_name; $param.=" -h ".$dolibarr_main_db_host; if (! empty($dolibarr_main_db_port)) $param.=" -P ".$dolibarr_main_db_port; $param.=" -u ".$dolibarr_main_db_user; $paramcrypted=$param; $paramclear=$param; if (! empty($dolibarr_main_db_pass)) { $paramcrypted.=" -p".preg_replace('/./i','*',$dolibarr_main_db_pass); $paramclear.=" -p".$dolibarr_main_db_pass; } echo $langs->trans("ImportMySqlDesc"); print '
'; print '
'; if (empty($_GET["showpass"])) print '
'.$langs->trans("UnHidePassword").''; //else print '
'.$langs->trans("HidePassword").''; ?>