2006-08-20 21:15:47 +02:00
< ? php
2012-08-02 10:07:55 +02:00
/* Copyright ( C ) 2006 - 2012 Laurent Destailleur < eldy @ users . sourceforge . net >
2012-12-30 15:13:49 +01:00
* Copyright ( C ) 2006 - 2012 Regis Houssin < regis . houssin @ capnetworks . com >
2006-08-20 21:15:47 +02:00
*
* 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
2013-01-16 15:36:08 +01:00
* the Free Software Foundation ; either version 3 of the License , or
2006-08-20 21:15:47 +02:00
* ( 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
2011-08-03 02:45:22 +02:00
* along with this program . If not , see < http :// www . gnu . org / licenses />.
2006-08-20 21:15:47 +02:00
*/
/**
2009-07-06 20:29:40 +02:00
* \file htdocs / admin / tools / dolibarr_export . php
* \ingroup core
* \brief Page to export database
*/
2007-07-28 13:29:09 +02:00
2012-08-22 23:24:21 +02:00
require '../../main.inc.php' ;
2012-08-22 23:11:24 +02:00
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' ;
2006-08-20 21:15:47 +02:00
$langs -> load ( " admin " );
2012-08-02 10:07:55 +02:00
$action = GETPOST ( 'action' , 'alpha' );
2012-02-10 11:09:34 +01:00
2012-08-02 10:07:55 +02:00
$sortfield = GETPOST ( 'sortfield' , 'alpha' );
$sortorder = GETPOST ( 'sortorder' , 'alpha' );
$page = GETPOST ( 'page' , 'int' );
2012-02-10 11:09:34 +01:00
if ( ! $sortorder ) $sortorder = " DESC " ;
if ( ! $sortfield ) $sortfield = " date " ;
if ( $page < 0 ) { $page = 0 ; }
2012-02-10 10:53:11 +01:00
$limit = $conf -> liste_limit ;
$offset = $limit * $page ;
2012-08-02 10:07:55 +02:00
if ( ! $user -> admin )
accessforbidden ();
2009-01-23 15:29:57 +01:00
2012-02-10 10:53:11 +01:00
/*
* Actions
*/
2012-02-10 11:09:34 +01:00
if ( $action == 'delete' )
{
2014-03-31 00:19:31 +02:00
$file = $conf -> admin -> dir_output . '/' . GETPOST ( 'urlfile' );
2012-07-29 16:11:52 +02:00
$ret = dol_delete_file ( $file , 1 );
if ( $ret ) setEventMessage ( $langs -> trans ( " FileWasRemoved " , GETPOST ( 'urlfile' )));
2012-07-29 15:47:24 +02:00
else setEventMessage ( $langs -> trans ( " ErrorFailToDeleteFile " , GETPOST ( 'urlfile' )), 'errors' );
2012-02-10 11:09:34 +01:00
$action = '' ;
}
2007-07-28 13:29:09 +02:00
/*
2010-09-06 11:51:00 +02:00
* View
*/
2006-08-20 21:15:47 +02:00
2012-02-10 10:53:11 +01:00
$form = new Form ( $db );
$formfile = new FormFile ( $db );
2012-03-15 20:45:08 +01:00
$label = getStaticMember ( $db , 'label' );
2011-12-28 12:53:46 +01:00
$help_url = 'EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad' ;
llxHeader ( '' , '' , $help_url );
2006-08-20 21:15:47 +02:00
2010-09-06 11:51:00 +02:00
?>
2011-11-21 01:34:37 +01:00
< script type = " text/javascript " >
2010-09-06 11:51:00 +02:00
jQuery ( document ) . ready ( function () {
2011-10-14 16:02:18 +02:00
function hideoptions () {
jQuery ( " #mysql_options " ) . hide ();
2012-08-16 16:02:08 +02:00
jQuery ( " #mysql_nobin_options " ) . hide ();
2011-10-14 16:02:18 +02:00
jQuery ( " #postgresql_options " ) . hide ();
}
hideoptions ();
2010-09-06 11:51:00 +02:00
jQuery ( " #radio_dump_mysql " ) . click ( function () {
2011-10-14 16:02:18 +02:00
hideoptions ();
2010-09-06 11:51:00 +02:00
jQuery ( " #mysql_options " ) . show ();
});
2011-10-14 16:02:18 +02:00
jQuery ( " #radio_dump_mysql_nobin " ) . click ( function () {
hideoptions ();
2012-08-16 16:02:08 +02:00
jQuery ( " #mysql_nobin_options " ) . show ();
2011-10-14 16:02:18 +02:00
});
2010-09-06 11:51:00 +02:00
jQuery ( " #radio_dump_postgresql " ) . click ( function () {
2011-10-14 16:02:18 +02:00
hideoptions ();
2010-09-06 11:51:00 +02:00
jQuery ( " #postgresql_options " ) . show ();
});
2012-02-10 10:00:32 +01:00
jQuery ( " #select_sql_compat " ) . click ( function () {
if ( jQuery ( " #select_sql_compat " ) . val () == 'POSTGRESQL' )
{
jQuery ( " #checkbox_dump_disable-add-locks " ) . attr ( 'checked' , true );
};
});
2012-03-15 20:45:08 +01:00
< ? php
if ( $label == 'MySQL' ) print 'jQuery("#radio_dump_mysql").click();' ;
if ( $label == 'PostgreSQL' ) print 'jQuery("#radio_dump_postgresql").click();' ;
?>
2010-09-06 11:51:00 +02:00
});
</ script >
< ? php
2007-07-28 13:29:09 +02:00
print_fiche_titre ( $langs -> trans ( " Backup " ), '' , 'setup' );
2009-03-13 01:45:54 +01:00
print $langs -> trans ( " BackupDesc " , DOL_DATA_ROOT ) . '<br><br>' ;
print $langs -> trans ( " BackupDesc2 " , DOL_DATA_ROOT ) . '<br>' ;
2009-01-23 15:29:57 +01:00
print $langs -> trans ( " BackupDescX " ) . '<br><br>' ;
2009-03-13 01:45:54 +01:00
print $langs -> trans ( " BackupDesc3 " , DOL_DATA_ROOT ) . '<br>' ;
2009-03-09 13:38:22 +01:00
print $langs -> trans ( " BackupDescY " ) . '<br><br>' ;
2007-07-28 13:29:09 +02:00
2011-12-28 01:28:16 +01:00
2007-07-28 13:29:09 +02:00
?>
<!-- Dump of a server -->
2010-09-06 11:51:00 +02:00
< form method = " post " action = " export.php " name = " dump " >< input type = " hidden "
name = " token " value = " <?php echo $_SESSION['newtoken'] ; ?> " /> < input
type = " hidden " name = " export_type " value = " server " />
2011-10-14 16:02:18 +02:00
< fieldset id = " fieldsetexport " >
2010-09-06 11:51:00 +02:00
< ? php print '<legend>' . $langs -> trans ( " DatabaseName " ) . ' : <b>' . $dolibarr_main_db_name . '</b></legend>' ; ?>
< table >
< tr >
< td valign = " top " >
< div id = " div_container_exportoptions " >
< fieldset id = " exportoptions " >< legend >< ? php echo $langs -> trans ( " ExportMethod " ); ?> </legend>
< ? php
2011-12-28 01:28:16 +01:00
if ( $label == 'MySQL' )
2010-09-06 11:51:00 +02:00
{
?>
2011-01-10 02:40:49 +01:00
< div class = " formelementrow " >< input type = " radio " name = " what " value = " mysql " id = " radio_dump_mysql " />
< label for = " radio_dump_mysql " > MySQL Dump ( mysqldump ) </ label >
</ div >
2012-02-09 23:07:58 +01:00
< br >
2011-10-14 16:02:18 +02:00
< div class = " formelementrow " >< input type = " radio " name = " what " value = " mysqlnobin " id = " radio_dump_mysql_nobin " />
2012-08-23 08:46:22 +02:00
< label for = " radio_dump_mysql " > MySQL Dump ( php ) < ? php print img_warning ( $langs -> trans ( 'BackupPHPWarning' )) ?> </label>
2011-10-14 16:02:18 +02:00
</ div >
2010-09-06 11:51:00 +02:00
< ? php
}
2011-12-28 01:28:16 +01:00
else if ( $label == 'PostgreSQL' )
2010-09-06 11:51:00 +02:00
{
2011-01-10 02:40:49 +01:00
?>
< div class = " formelementrow " >< input type = " radio " name = " what " value = " postgresql " id = " radio_dump_postgresql " />
< label for = " radio_dump_postgresql " > PostgreSQL Dump ( pg_dump ) </ label >
</ div >
< ? php
2010-09-06 11:51:00 +02:00
}
else
{
2011-12-28 01:28:16 +01:00
print 'No method available with database ' . $label ;
2010-09-06 11:51:00 +02:00
}
?>
</ fieldset >
</ div >
</ td >
< td valign = " top " >
< div id = " div_container_sub_exportoptions " >
< ? php
2011-12-28 01:28:16 +01:00
if ( $label == 'MySQL' )
2010-09-06 11:51:00 +02:00
{
?> <!-- Fieldset mysqldump -->
< fieldset id = " mysql_options " >< legend >< ? php echo $langs -> trans ( " MySqlExportParameters " ); ?> </legend>
< div class = " formelementrow " >< ? php echo $langs -> trans ( " FullPathToMysqldumpCommand " );
if ( empty ( $conf -> global -> SYSTEMTOOLS_MYSQLDUMP ))
{
2009-11-29 20:32:16 +01:00
$fullpathofmysqldump = $db -> getPathOfDump ();
2010-09-06 11:51:00 +02:00
}
else
{
$fullpathofmysqldump = $conf -> global -> SYSTEMTOOLS_MYSQLDUMP ;
}
?> <br>
< input type = " text " name = " mysqldump " size = " 80 "
value = " <?php echo $fullpathofmysqldump ; ?> " /></ div >
< br >
< fieldset >< legend >< ? php echo $langs -> trans ( " ExportOptions " ); ?> </legend>
< div class = " formelementrow " >< input type = " checkbox "
name = " use_transaction " value = " yes " id = " checkbox_use_transaction " /> < label
for = " checkbox_use_transaction " > < ? php echo $langs -> trans ( " UseTransactionnalMode " ); ?> </label>
</ div >
< div class = " formelementrow " >< input type = " checkbox " name = " disable_fk "
2011-01-09 16:37:23 +01:00
value = " yes " id = " checkbox_disable_fk " checked = " checked " /> < label
2013-03-14 09:50:02 +01:00
for = " checkbox_disable_fk " > < ? php echo $langs -> trans ( " CommandsToDisableForeignKeysForImport " ); ?> <?php print img_info($langs->trans('CommandsToDisableForeignKeysForImportWarning')); ?></label>
2010-09-06 11:51:00 +02:00
</ div >
< label for = " select_sql_compat " > < ? php echo $langs -> trans ( " ExportCompatibility " ); ?> </label>
2011-06-15 02:02:59 +02:00
< select name = " sql_compat " id = " select_sql_compat " class = " flat " >
2010-09-06 11:51:00 +02:00
< option value = " NONE " selected = " selected " > NONE </ option >
< option value = " ANSI " > ANSI </ option >
< option value = " DB2 " > DB2 </ option >
< option value = " MAXDB " > MAXDB </ option >
< option value = " MYSQL323 " > MYSQL323 </ option >
< option value = " MYSQL40 " > MYSQL40 </ option >
< option value = " MSSQL " > MSSQL </ option >
< option value = " ORACLE " > ORACLE </ option >
< option value = " POSTGRESQL " > POSTGRESQL </ option >
</ select > < br >
<!-- < input type = " checkbox " name = " drop_database " value = " yes "
id = " checkbox_drop_database " /> < label for = " checkbox_drop_database " >< ? php echo $langs -> trans ( " AddDropDatabase " ); ?> </label>
-->
</ fieldset >
< br >
< fieldset >< legend > < input type = " checkbox " name = " sql_structure "
value = " structure " id = " checkbox_sql_structure " checked = " checked " /> < label
2012-08-23 08:46:22 +02:00
for = " checkbox_sql_structure " > < ? php echo $langs -> trans ( 'ExportStructure' ) ?> </label> </legend> <input
2013-11-01 17:19:25 +01:00
type = " checkbox " name = " drop " < ? php echo (( ! isset ( $_GET [ " drop " ]) && ! isset ( $_POST [ " drop " ])) || GETPOST ( 'drop' )) ? ' checked="checked"' : '' ; ?> id="checkbox_dump_drop" /> <label
2010-09-06 11:51:00 +02:00
for = " checkbox_dump_drop " >< ? php echo $langs -> trans ( " AddDropTable " ); ?> </label><br>
</ fieldset >
< br >
< fieldset >< legend > < input type = " checkbox " name = " sql_data " value = " data "
id = " checkbox_sql_data " checked = " checked " /> < label for = " checkbox_sql_data " >
< ? php echo $langs -> trans ( " Datas " ); ?> </label> </legend> <input
type = " checkbox " name = " showcolumns " value = " yes "
2012-02-10 11:50:41 +01:00
id = " checkbox_dump_showcolumns " checked = " checked " /> < label
2010-09-06 11:51:00 +02:00
for = " checkbox_dump_showcolumns " > < ? php echo $langs -> trans ( " NameColumn " ); ?> </label><br>
< input type = " checkbox " name = " extended_ins " value = " yes "
2012-02-10 11:50:41 +01:00
id = " checkbox_dump_extended_ins " checked = " checked " /> < label
2010-09-06 11:51:00 +02:00
for = " checkbox_dump_extended_ins " > < ? php echo $langs -> trans ( " ExtendedInsert " ); ?> </label><br>
2012-02-09 23:07:58 +01:00
< input type = " checkbox " name = " disable-add-locks " value = " no "
id = " checkbox_dump_disable-add-locks " /> < label
for = " checkbox_dump_disable-add-locks " > < ? php echo $langs -> trans ( " NoLockBeforeInsert " ); ?> </label><br>
2010-09-06 11:51:00 +02:00
< input type = " checkbox " name = " delayed " value = " yes "
id = " checkbox_dump_delayed " /> < label for = " checkbox_dump_delayed " > < ? php echo $langs -> trans ( " DelayedInsert " ); ?> </label><br>
< input type = " checkbox " name = " sql_ignore " value = " yes "
id = " checkbox_dump_ignore " /> < label for = " checkbox_dump_ignore " > < ? php echo $langs -> trans ( " IgnoreDuplicateRecords " ); ?> </label><br>
< input type = " checkbox " name = " hexforbinary " value = " yes "
id = " checkbox_hexforbinary " checked = " checked " /> < label
for = " checkbox_hexforbinary " > < ? php echo $langs -> trans ( " EncodeBinariesInHexa " ); ?> </label><br>
2012-02-10 10:53:11 +01:00
< input type = " checkbox " name = " charset_utf8 " value = " yes "
id = " checkbox_charset_utf8 " checked = " checked " disabled = " disabled " /> < label
for = " checkbox_charset_utf8 " > < ? php echo $langs -> trans ( " UTF8 " ); ?> </label><br>
2010-09-06 11:51:00 +02:00
</ fieldset >
</ fieldset >
2012-08-16 16:02:08 +02:00
<!-- Fieldset mysql_nobin -->
< fieldset id = " mysql_nobin_options " >< legend >< ? php echo $langs -> trans ( " MySqlExportParameters " ); ?> </legend>
< fieldset >
< legend >< ? php echo $langs -> trans ( " ExportOptions " ); ?> </legend>
< div class = " formelementrow " >< input type = " checkbox "
name = " nobin_use_transaction " value = " yes " id = " checkbox_use_transaction " /> < label
for = " checkbox_use_transaction " > < ? php echo $langs -> trans ( " UseTransactionnalMode " ); ?> </label>
</ div >
< div class = " formelementrow " >< input type = " checkbox " name = " nobin_disable_fk "
value = " yes " id = " checkbox_disable_fk " checked = " checked " /> < label
2012-08-23 08:46:22 +02:00
for = " checkbox_disable_fk " > < ? php echo $langs -> trans ( " CommandsToDisableForeignKeysForImport " ); ?> <?php print img_info($langs->trans('CommandsToDisableForeignKeysForImportWarning')); ?></label>
2012-08-16 16:02:08 +02:00
</ div >
</ fieldset >
< br >
2012-08-23 08:46:22 +02:00
< fieldset >< legend >< ? php echo $langs -> trans ( 'ExportStructure' ) ?> </legend> <input
2013-11-01 17:19:25 +01:00
type = " checkbox " name = " nobin_drop " < ? php echo (( ! isset ( $_GET [ " nobin_drop " ]) && ! isset ( $_POST [ " nobin_drop " ])) || GETPOST ( 'nobin_drop' )) ? ' checked="checked"' : '' ; ?> id="checkbox_dump_drop" /> <label
2012-08-16 16:02:08 +02:00
for = " checkbox_dump_drop " >< ? php echo $langs -> trans ( " AddDropTable " ); ?> </label><br>
</ fieldset >
< br >
< fieldset >
< legend >< ? php echo $langs -> trans ( " Datas " ); ?> </legend>
< input type = " checkbox " name = " nobin_nolocks " value = " no "
id = " checkbox_dump_disable-add-locks " /> < label
for = " checkbox_dump_disable-add-locks " > < ? php echo $langs -> trans ( " NoLockBeforeInsert " ); ?> </label><br>
< input type = " checkbox " name = " nobin_delayed " value = " yes "
id = " checkbox_dump_delayed " /> < label for = " checkbox_dump_delayed " > < ? php echo $langs -> trans ( " DelayedInsert " ); ?> </label><br>
< input type = " checkbox " name = " nobin_sql_ignore " value = " yes "
id = " checkbox_dump_ignore " /> < label for = " checkbox_dump_ignore " > < ? php echo $langs -> trans ( " IgnoreDuplicateRecords " ); ?> </label><br>
< input type = " checkbox " name = " nobin_charset_utf8 " value = " yes "
id = " checkbox_charset_utf8 " checked = " checked " disabled = " disabled " /> < label
for = " checkbox_charset_utf8 " > < ? php echo $langs -> trans ( " UTF8 " ); ?> </label><br>
</ fieldset >
</ fieldset >
2010-09-06 11:51:00 +02:00
< ? php
}
2011-12-28 01:28:16 +01:00
if ( $label == 'PostgreSQL' )
2010-09-06 11:51:00 +02:00
{
?> <!-- Fieldset pg_dump -->
< fieldset id = " postgresql_options " >< legend >< ? php echo $langs -> trans ( " PostgreSqlExportParameters " ); ?> </legend>
< div class = " formelementrow " >< ? php echo $langs -> trans ( " FullPathToPostgreSQLdumpCommand " );
if ( empty ( $conf -> global -> SYSTEMTOOLS_POSTGRESQLDUMP ))
{
2009-11-29 20:32:16 +01:00
$fullpathofpgdump = $db -> getPathOfDump ();
2010-09-06 11:51:00 +02:00
}
else
{
$fullpathofpgdump = $conf -> global -> SYSTEMTOOLS_POSTGRESQLDUMP ;
}
?> <br>
< input type = " text " name = " postgresqldump " size = " 80 "
value = " <?php echo $fullpathofpgdump ; ?> " /></ div >
< br >
< fieldset >< legend >< ? php echo $langs -> trans ( " ExportOptions " ); ?> </legend>
< label for = " select_sql_compat " > < ? php echo $langs -> trans ( " ExportCompatibility " ); ?> </label>
2011-06-15 09:44:02 +02:00
< select name = " sql_compat " id = " select_sql_compat " class = " flat " >
2010-09-06 11:51:00 +02:00
< option value = " POSTGRESQL " selected = " selected " > POSTGRESQL </ option >
< option value = " ANSI " > ANSI </ option >
</ select >< br >
<!-- < input type = " checkbox " name = " drop_database " value = " yes "
id = " checkbox_drop_database " /> < label for = " checkbox_drop_database " >< ? php echo $langs -> trans ( " AddDropDatabase " ); ?> </label>
-->
</ fieldset >
< br >
< fieldset >< legend > < input type = " checkbox " name = " sql_structure "
value = " structure " id = " checkbox_sql_structure " checked = " checked " /> < label
2012-08-23 08:46:22 +02:00
for = " checkbox_sql_structure " > < ? php echo $langs -> trans ( 'ExportStructure' ) ?> </label> </legend></fieldset>
2010-09-06 11:51:00 +02:00
< br >
< fieldset >< legend > < input type = " checkbox " name = " sql_data " value = " data "
id = " checkbox_sql_data " checked = " checked " /> < label for = " checkbox_sql_data " >
< ? php echo $langs -> trans ( " Datas " ); ?> </label> </legend> <input
type = " checkbox " name = " showcolumns " value = " yes "
2012-02-10 11:50:41 +01:00
id = " checkbox_dump_showcolumns " checked = " checked " /> < label
2010-09-06 11:51:00 +02:00
for = " checkbox_dump_showcolumns " > < ? php echo $langs -> trans ( " NameColumn " ); ?> </label><br>
</ fieldset >
</ fieldset >
< ? php
}
?>
</ div >
</ td >
</ tr >
</ table >
2009-10-26 04:10:12 +01:00
2007-07-28 13:29:09 +02:00
</ fieldset >
2013-07-28 17:25:58 +02:00
< fieldset >
< legend >< ? php echo $langs -> trans ( " Destination " ); ?> </legend>
< label for = " filename_template " > < ? php echo $langs -> trans ( " FileNameToGenerate " ); ?> </label>:
2010-09-06 12:08:36 +02:00
< input type = " text " name = " filename_template " size = " 60 "
2010-09-06 11:51:00 +02:00
id = " filename_template "
value = " <?php
2009-10-26 04:10:12 +01:00
$prefix = 'dump' ;
2011-12-28 01:28:16 +01:00
if ( $label == 'MySQL' ) $prefix = 'mysqldump' ;
if ( $label == 'PostgreSQL' ) $prefix = 'pg_dump' ;
2009-10-26 04:10:12 +01:00
$file = $prefix . '_' . $dolibarr_main_db_name . '_' . dol_sanitizeFileName ( DOL_VERSION ) . '_' . strftime ( " %Y%m%d%H%M " ) . '.sql' ;
2007-07-28 13:29:09 +02:00
echo $file ;
2010-09-06 11:51:00 +02:00
?> " /> <br>
< br >
2007-07-28 13:29:09 +02:00
< ? php
2009-10-26 04:10:12 +01:00
// Define compressions array
2007-07-28 13:29:09 +02:00
$compression = array (
2012-05-06 15:32:23 +02:00
'none' => array ( 'function' => '' , 'id' => 'radio_compression_none' , 'label' => $langs -> trans ( " None " )),
'gz' => array ( 'function' => 'gzopen' , 'id' => 'radio_compression_gzip' , 'label' => $langs -> trans ( " Gzip " )),
2007-07-28 13:29:09 +02:00
);
2011-12-28 01:28:16 +01:00
if ( $label == 'MySQL' )
2009-10-26 04:10:12 +01:00
{
2012-05-06 15:32:23 +02:00
// $compression['zip']= array('function' => 'dol_compress', 'id' => 'radio_compression_zip', 'label' => $langs->trans("FormatZip")); // Not open source format. Must implement dol_compress function
$compression [ 'bz' ] = array ( 'function' => 'bzopen' , 'id' => 'radio_compression_bzip' , 'label' => $langs -> trans ( " Bzip2 " ));
2009-10-26 04:10:12 +01:00
}
// Show compression choices
print '<div class="formelementrow">' ;
print " \n " ;
print $langs -> trans ( " Compression " ) . ': ' ;
2007-07-28 13:29:09 +02:00
foreach ( $compression as $key => $val )
{
2010-09-06 12:08:36 +02:00
if ( ! $val [ 'function' ] || function_exists ( $val [ 'function' ])) // Enabled export format
2007-07-28 13:29:09 +02:00
{
2011-08-31 17:05:09 +02:00
print '<input type="radio" name="compression" value="' . $key . '" id="' . $val [ 'id' ] . '" checked="checked">' ;
2008-01-27 23:03:07 +01:00
print ' <label for="' . $val [ 'id' ] . '">' . $val [ 'label' ] . '</label>' ;
2007-07-28 13:29:09 +02:00
}
2010-09-06 12:08:36 +02:00
else // Disabled export format
2007-07-28 13:29:09 +02:00
{
2011-08-31 17:05:09 +02:00
print '<input type="radio" name="compression" value="' . $key . '" id="' . $val [ 'id' ] . '" disabled="disabled">' ;
2008-01-27 23:03:07 +01:00
print ' <label for="' . $val [ 'id' ] . '">' . $val [ 'label' ] . '</label>' ;
2007-07-28 13:29:09 +02:00
print ' (' . $langs -> trans ( " NotAvailable " ) . ')' ;
2009-01-23 15:29:57 +01:00
}
2007-07-28 13:29:09 +02:00
print ' ' ;
}
print '</div>' ;
print " \n " ;
2010-09-06 11:51:00 +02:00
?> </fieldset>
2007-07-28 13:29:09 +02:00
2013-07-28 17:25:58 +02:00
< br >
2011-12-21 19:34:16 +01:00
< div align = " center " >< input type = " submit " class = " button "
2010-09-06 11:51:00 +02:00
value = " <?php echo $langs->trans ( " GenerateBackup " ) ?> " id = " buttonGo " />< br >
< br >
2011-12-21 19:34:16 +01:00
</ div >
2007-07-28 13:29:09 +02:00
</ form >
< ? php
2012-02-10 10:53:11 +01:00
$filearray = dol_dir_list ( $conf -> admin -> dir_output . '/backup' , 'files' , 0 , '' , '' , $sortfield ,( strtolower ( $sortorder ) == 'asc' ? SORT_ASC : SORT_DESC ), 1 );
2012-02-10 11:09:34 +01:00
$result = $formfile -> list_of_documents ( $filearray , null , 'systemtools' , '' , 1 , 'backup/' , 1 , 0 , $langs -> trans ( " NoBackupFileAvailable " ), 0 , $langs -> trans ( " PreviousDumpFiles " ));
print '<br>' ;
2012-02-10 10:53:11 +01:00
2007-07-28 13:29:09 +02:00
2011-08-27 16:24:16 +02:00
llxFooter ();
2011-10-14 16:02:18 +02:00
$db -> close ();
2013-11-01 17:19:25 +01:00
?>