* Copyright (C) 2006-2012 Regis Houssin * * 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 3 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_import.php * \ingroup core * \brief Page to import database */ require '../../main.inc.php'; $langs->load("admin"); $langs->load("other"); if (! $user->admin) accessforbidden(); $radio_dump=GETPOST('radio_dump'); $showpass=GETPOST('showpass'); /* * View */ $label=$db::LABEL; $help_url='EN:Restores|FR:Restaurations|ES:Restauraciones'; llxHeader('','',$help_url); ?> trans("Restore"),'','title_setup'); print $langs->trans("RestoreDesc",DOL_DATA_ROOT).'

'; ?>
1 trans("RestoreDesc2",DOL_DATA_ROOT).'

'; ?>

2 trans("RestoreDesc3",$dolibarr_main_db_name).'

'; ?> trans("DatabaseName").' : '.$dolibarr_main_db_name.''; ?>

use_javascript_ajax) { ?>
trans("ImportMethod"); ?>
/>
/>
trans('RestoreMySQL') ?>
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"]) && $dolibarr_main_db_pass) print '
'.$langs->trans("UnHidePassword").''; //else print '
'.$langs->trans("HidePassword").''; ?>
Restore PostgreSQL
getPathOfRestore(); if (preg_match("/\s/",$command)) $command=$command=escapeshellarg($command); // Use quotes on command $param=" -d ".$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; }*/ $paramcrypted.=" -W"; $paramclear.=" -W"; // With psql: $paramcrypted.=" -f"; $paramclear.=" -f"; echo $langs->trans("ImportPostgreSqlDesc"); print '
'; print '
'; //if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) print '
'.$langs->trans("UnHidePassword").''; //else print '
'.$langs->trans("HidePassword").''; ?>
close();