Qual: Code is now simpler using jQuery. Removed rubbish javascript.
This commit is contained in:
parent
e5d963984b
commit
72756193bb
@ -43,6 +43,22 @@ $formfile = new FormFile($db);
|
|||||||
|
|
||||||
llxHeader('','','EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad');
|
llxHeader('','','EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad');
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" language="javascript">
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
jQuery("#mysql_options").hide();
|
||||||
|
jQuery("#postgresql_options").hide();
|
||||||
|
|
||||||
|
jQuery("#radio_dump_mysql").click(function() {
|
||||||
|
jQuery("#mysql_options").show();
|
||||||
|
});
|
||||||
|
jQuery("#radio_dump_postgresql").click(function() {
|
||||||
|
jQuery("#postgresql_options").show();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("Backup"),'','setup');
|
print_fiche_titre($langs->trans("Backup"),'','setup');
|
||||||
|
|
||||||
print $langs->trans("BackupDesc",DOL_DATA_ROOT).'<br><br>';
|
print $langs->trans("BackupDesc",DOL_DATA_ROOT).'<br><br>';
|
||||||
@ -61,92 +77,34 @@ if ($_GET["msg"])
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Dump of a server -->
|
<!-- Dump of a server -->
|
||||||
<form method="post" action="export.php" name="dump">
|
<form method="post" action="export.php" name="dump"><input type="hidden"
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
name="token" value="<?php echo $_SESSION['newtoken']; ?>" /> <input
|
||||||
|
type="hidden" name="export_type" value="server" />
|
||||||
|
|
||||||
<input type="hidden" name="export_type" value="server" />
|
<fieldset id="fieldsetexport"><!-- LDR -->
|
||||||
|
<?php print '<legend>'.$langs->trans("DatabaseName").' : <b>'.$dolibarr_main_db_name.'</b></legend>'; ?>
|
||||||
<script type="text/javascript" language="javascript">
|
<table>
|
||||||
//<![CDATA[
|
<tr>
|
||||||
function hide_them_all() {
|
<td valign="top">
|
||||||
<?php
|
|
||||||
if ($db->label == 'MySQL')
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
document.getElementById("mysql_options").style.display = 'none';
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php
|
|
||||||
if ($db->label == 'PostgreSQL')
|
|
||||||
{
|
|
||||||
?>
|
|
||||||
document.getElementById("postgresql_options").style.display = 'none';
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
}
|
|
||||||
|
|
||||||
function show_checked_option() {
|
|
||||||
hide_them_all();
|
|
||||||
|
|
||||||
if (document.getElementById('radio_dump_mysql')) {
|
|
||||||
document.getElementById('mysql_options').style.display = 'block';
|
|
||||||
}
|
|
||||||
if (document.getElementById('radio_dump_postgresql')) {
|
|
||||||
document.getElementById('postgresql_options').style.display = 'block';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//]]>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<fieldset id="fieldsetexport">
|
|
||||||
|
|
||||||
|
|
||||||
<!-- LDR -->
|
|
||||||
<table><tr><td valign="top">
|
|
||||||
|
|
||||||
<?php
|
|
||||||
print $langs->trans("DatabaseName").' : <b>'.$dolibarr_main_db_name.'</b><br>';
|
|
||||||
print '<br>';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div id="div_container_exportoptions">
|
<div id="div_container_exportoptions">
|
||||||
<fieldset id="exportoptions">
|
<fieldset id="exportoptions"><legend><?php echo $langs->trans("ExportMethod"); ?></legend>
|
||||||
<legend><?php echo $langs->trans("ExportMethod"); ?></legend>
|
|
||||||
<?php
|
<?php
|
||||||
if ($db->label == 'MySQL')
|
if ($db->label == 'MySQL')
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div class="formelementrow">
|
<div class="formelementrow"><input type="radio" name="what"
|
||||||
<input type="radio" name="what" value="mysql" id="radio_dump_mysql"
|
value="mysql" id="radio_dump_mysql" /> <label for="radio_dump_mysql">MySQL
|
||||||
onclick="
|
Dump (mysqldump)</label></div>
|
||||||
if (this.checked) {
|
|
||||||
hide_them_all();
|
|
||||||
document.getElementById('mysql_options').style.display = 'block';
|
|
||||||
}; return true"
|
|
||||||
/>
|
|
||||||
<label for="radio_dump_mysql">MySQL Dump (mysqldump)</label>
|
|
||||||
</div>
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
else if ($db->label == 'PostgreSQL')
|
else if ($db->label == 'PostgreSQL')
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<div class="formelementrow">
|
<div class="formelementrow"><input type="radio" name="what"
|
||||||
<input type="radio" name="what" value="postgresql" id="radio_dump_postgresql"
|
value="postgresql" id="radio_dump_postgresql" /> <label
|
||||||
onclick="
|
for="radio_dump_postgresql">PostgreSQL Dump (pg_dump)</label></div>
|
||||||
if (this.checked) {
|
|
||||||
hide_them_all();
|
|
||||||
document.getElementById('postgresql_options').style.display = 'block';
|
|
||||||
}; return true"
|
|
||||||
/>
|
|
||||||
<label for="radio_dump_postgresql">PostgreSQL Dump (pg_dump)</label>
|
|
||||||
</div>
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -154,25 +112,21 @@ else
|
|||||||
print 'No method available with database '.$db->label;
|
print 'No method available with database '.$db->label;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</td><td valign="top">
|
</td>
|
||||||
|
<td valign="top">
|
||||||
|
|
||||||
|
|
||||||
<div id="div_container_sub_exportoptions">
|
<div id="div_container_sub_exportoptions">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($db->label == 'MySQL')
|
if ($db->label == 'MySQL')
|
||||||
{
|
{
|
||||||
?>
|
?> <!-- Fieldset mysqldump -->
|
||||||
<!-- Fieldset mysqldump -->
|
<fieldset id="mysql_options"><legend><?php echo $langs->trans("MySqlExportParameters"); ?></legend>
|
||||||
<fieldset id="mysql_options">
|
|
||||||
<legend><?php echo $langs->trans("MySqlExportParameters"); ?></legend>
|
|
||||||
|
|
||||||
<div class="formelementrow">
|
<div class="formelementrow"><?php echo $langs->trans("FullPathToMysqldumpCommand");
|
||||||
<?php echo $langs->trans("FullPathToMysqldumpCommand");
|
|
||||||
if (empty($conf->global->SYSTEMTOOLS_MYSQLDUMP))
|
if (empty($conf->global->SYSTEMTOOLS_MYSQLDUMP))
|
||||||
{
|
{
|
||||||
$fullpathofmysqldump=$db->getPathOfDump();
|
$fullpathofmysqldump=$db->getPathOfDump();
|
||||||
@ -183,28 +137,21 @@ if ($db->label == 'MySQL')
|
|||||||
}
|
}
|
||||||
?><br>
|
?><br>
|
||||||
<input type="text" name="mysqldump" size="80"
|
<input type="text" name="mysqldump" size="80"
|
||||||
value="<?php echo $fullpathofmysqldump; ?>" />
|
value="<?php echo $fullpathofmysqldump; ?>" /></div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<fieldset>
|
<fieldset><legend><?php echo $langs->trans("ExportOptions"); ?></legend>
|
||||||
<legend><?php echo $langs->trans("ExportOptions"); ?></legend>
|
<div class="formelementrow"><input type="checkbox"
|
||||||
<div class="formelementrow">
|
name="use_transaction" value="yes" id="checkbox_use_transaction" /> <label
|
||||||
<input type="checkbox" name="use_transaction" value="yes"
|
for="checkbox_use_transaction"> <?php echo $langs->trans("UseTransactionnalMode"); ?></label>
|
||||||
id="checkbox_use_transaction"
|
|
||||||
/>
|
|
||||||
<label for="checkbox_use_transaction">
|
|
||||||
<?php echo $langs->trans("UseTransactionnalMode"); ?></label>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="formelementrow">
|
<div class="formelementrow"><input type="checkbox" name="disable_fk"
|
||||||
<input type="checkbox" name="disable_fk" value="yes" id="checkbox_disable_fk" checked="true" />
|
value="yes" id="checkbox_disable_fk" checked="true" /> <label
|
||||||
<label for="checkbox_disable_fk">
|
for="checkbox_disable_fk"> <?php echo $langs->trans("CommandsToDisableForeignKeysForImport"); ?></label>
|
||||||
<?php echo $langs->trans("CommandsToDisableForeignKeysForImport"); ?></label>
|
|
||||||
</div>
|
</div>
|
||||||
<label for="select_sql_compat">
|
<label for="select_sql_compat"> <?php echo $langs->trans("ExportCompatibility"); ?></label>
|
||||||
<?php echo $langs->trans("ExportCompatibility"); ?></label>
|
|
||||||
|
|
||||||
<select name="sql_compat" id="select_sql_compat">
|
<select name="sql_compat" id="select_sql_compat">
|
||||||
<option value="NONE" selected="selected">NONE</option>
|
<option value="NONE" selected="selected">NONE</option>
|
||||||
@ -216,75 +163,41 @@ if ($db->label == 'MySQL')
|
|||||||
<option value="MSSQL">MSSQL</option>
|
<option value="MSSQL">MSSQL</option>
|
||||||
<option value="ORACLE">ORACLE</option>
|
<option value="ORACLE">ORACLE</option>
|
||||||
<option value="POSTGRESQL">POSTGRESQL</option>
|
<option value="POSTGRESQL">POSTGRESQL</option>
|
||||||
</select>
|
</select> <br>
|
||||||
|
<!-- <input type="checkbox" name="drop_database" value="yes"
|
||||||
<br>
|
id="checkbox_drop_database" /> <label for="checkbox_drop_database"><?php echo $langs->trans("AddDropDatabase"); ?></label>
|
||||||
<input type="checkbox" name="drop_database" value="yes"
|
-->
|
||||||
id="checkbox_drop_database"
|
|
||||||
/>
|
|
||||||
<label for="checkbox_drop_database"><?php echo $langs->trans("AddDropDatabase"); ?></label>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<fieldset>
|
<fieldset><legend> <input type="checkbox" name="sql_structure"
|
||||||
<legend>
|
value="structure" id="checkbox_sql_structure" checked="checked" /> <label
|
||||||
<input type="checkbox" name="sql_structure" value="structure"
|
for="checkbox_sql_structure"> Structure</label> </legend> <input
|
||||||
id="checkbox_sql_structure"
|
type="checkbox" name="drop" value="1" id="checkbox_dump_drop" /> <label
|
||||||
checked="checked" onclick="
|
for="checkbox_dump_drop"><?php echo $langs->trans("AddDropTable"); ?></label><br>
|
||||||
if (!this.checked && !document.getElementById('checkbox_sql_data').checked)
|
|
||||||
return false;
|
|
||||||
else return true;" />
|
|
||||||
<label for="checkbox_sql_structure">
|
|
||||||
Structure</label>
|
|
||||||
</legend>
|
|
||||||
|
|
||||||
<input type="checkbox" name="drop" value="1" id="checkbox_dump_drop"
|
|
||||||
/>
|
|
||||||
<label for="checkbox_dump_drop"><?php echo $langs->trans("AddDropTable"); ?></label><br>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<fieldset>
|
<fieldset><legend> <input type="checkbox" name="sql_data" value="data"
|
||||||
<legend>
|
id="checkbox_sql_data" checked="checked" /> <label for="checkbox_sql_data">
|
||||||
|
<?php echo $langs->trans("Datas"); ?></label> </legend> <input
|
||||||
<input type="checkbox" name="sql_data" value="data"
|
type="checkbox" name="showcolumns" value="yes"
|
||||||
id="checkbox_sql_data" checked="checked" onclick="
|
id="checkbox_dump_showcolumns" /> <label
|
||||||
if (!this.checked && (!document.getElementById('checkbox_sql_structure') || !document.getElementById('checkbox_sql_structure').checked))
|
for="checkbox_dump_showcolumns"> <?php echo $langs->trans("NameColumn"); ?></label><br>
|
||||||
return false;
|
|
||||||
else return true;" />
|
|
||||||
<label for="checkbox_sql_data">
|
|
||||||
<?php echo $langs->trans("Datas"); ?></label>
|
|
||||||
</legend>
|
|
||||||
<input type="checkbox" name="showcolumns" value="yes"
|
|
||||||
id="checkbox_dump_showcolumns"
|
|
||||||
/>
|
|
||||||
<label for="checkbox_dump_showcolumns">
|
|
||||||
<?php echo $langs->trans("NameColumn"); ?></label><br>
|
|
||||||
|
|
||||||
<input type="checkbox" name="extended_ins" value="yes"
|
<input type="checkbox" name="extended_ins" value="yes"
|
||||||
id="checkbox_dump_extended_ins"
|
id="checkbox_dump_extended_ins" /> <label
|
||||||
/>
|
for="checkbox_dump_extended_ins"> <?php echo $langs->trans("ExtendedInsert"); ?></label><br>
|
||||||
<label for="checkbox_dump_extended_ins">
|
|
||||||
<?php echo $langs->trans("ExtendedInsert"); ?></label><br>
|
|
||||||
|
|
||||||
<input type="checkbox" name="delayed" value="yes"
|
<input type="checkbox" name="delayed" value="yes"
|
||||||
id="checkbox_dump_delayed"
|
id="checkbox_dump_delayed" /> <label for="checkbox_dump_delayed"> <?php echo $langs->trans("DelayedInsert"); ?></label><br>
|
||||||
/>
|
|
||||||
|
|
||||||
<label for="checkbox_dump_delayed">
|
|
||||||
<?php echo $langs->trans("DelayedInsert"); ?></label><br>
|
|
||||||
|
|
||||||
<input type="checkbox" name="sql_ignore" value="yes"
|
<input type="checkbox" name="sql_ignore" value="yes"
|
||||||
id="checkbox_dump_ignore"
|
id="checkbox_dump_ignore" /> <label for="checkbox_dump_ignore"> <?php echo $langs->trans("IgnoreDuplicateRecords"); ?></label><br>
|
||||||
/>
|
|
||||||
<label for="checkbox_dump_ignore">
|
|
||||||
<?php echo $langs->trans("IgnoreDuplicateRecords"); ?></label><br>
|
|
||||||
|
|
||||||
<input type="checkbox" name="hexforbinary" value="yes"
|
<input type="checkbox" name="hexforbinary" value="yes"
|
||||||
id="checkbox_hexforbinary"
|
id="checkbox_hexforbinary" checked="checked" /> <label
|
||||||
checked="checked" />
|
for="checkbox_hexforbinary"> <?php echo $langs->trans("EncodeBinariesInHexa"); ?></label><br>
|
||||||
<label for="checkbox_hexforbinary">
|
|
||||||
<?php echo $langs->trans("EncodeBinariesInHexa"); ?></label><br>
|
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@ -293,13 +206,10 @@ if ($db->label == 'MySQL')
|
|||||||
|
|
||||||
if ($db->label == 'PostgreSQL')
|
if ($db->label == 'PostgreSQL')
|
||||||
{
|
{
|
||||||
?>
|
?> <!-- Fieldset pg_dump -->
|
||||||
<!-- Fieldset pg_dump -->
|
<fieldset id="postgresql_options"><legend><?php echo $langs->trans("PostgreSqlExportParameters"); ?></legend>
|
||||||
<fieldset id="postgresql_options">
|
|
||||||
<legend><?php echo $langs->trans("PostgreSqlExportParameters"); ?></legend>
|
|
||||||
|
|
||||||
<div class="formelementrow">
|
<div class="formelementrow"><?php echo $langs->trans("FullPathToPostgreSQLdumpCommand");
|
||||||
<?php echo $langs->trans("FullPathToPostgreSQLdumpCommand");
|
|
||||||
if (empty($conf->global->SYSTEMTOOLS_POSTGRESQLDUMP))
|
if (empty($conf->global->SYSTEMTOOLS_POSTGRESQLDUMP))
|
||||||
{
|
{
|
||||||
$fullpathofpgdump=$db->getPathOfDump();
|
$fullpathofpgdump=$db->getPathOfDump();
|
||||||
@ -310,277 +220,60 @@ if ($db->label == 'PostgreSQL')
|
|||||||
}
|
}
|
||||||
?><br>
|
?><br>
|
||||||
<input type="text" name="postgresqldump" size="80"
|
<input type="text" name="postgresqldump" size="80"
|
||||||
value="<?php echo $fullpathofpgdump; ?>" />
|
value="<?php echo $fullpathofpgdump; ?>" /></div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<fieldset>
|
<fieldset><legend><?php echo $langs->trans("ExportOptions"); ?></legend>
|
||||||
<legend><?php echo $langs->trans("ExportOptions"); ?></legend>
|
<label for="select_sql_compat"> <?php echo $langs->trans("ExportCompatibility"); ?></label>
|
||||||
<label for="select_sql_compat">
|
|
||||||
<?php echo $langs->trans("ExportCompatibility"); ?></label>
|
|
||||||
<select name="sql_compat" id="select_sql_compat">
|
<select name="sql_compat" id="select_sql_compat">
|
||||||
<option value="POSTGRESQL" selected="selected">POSTGRESQL</option>
|
<option value="POSTGRESQL" selected="selected">POSTGRESQL</option>
|
||||||
<option value="ANSI">ANSI</option>
|
<option value="ANSI">ANSI</option>
|
||||||
</select><br>
|
</select><br>
|
||||||
<input type="checkbox" name="drop_database" value="yes"
|
<!-- <input type="checkbox" name="drop_database" value="yes"
|
||||||
id="checkbox_drop_database"
|
id="checkbox_drop_database" /> <label for="checkbox_drop_database"><?php echo $langs->trans("AddDropDatabase"); ?></label>
|
||||||
/>
|
-->
|
||||||
<label for="checkbox_drop_database"><?php echo $langs->trans("AddDropDatabase"); ?></label>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<fieldset>
|
<fieldset><legend> <input type="checkbox" name="sql_structure"
|
||||||
<legend>
|
value="structure" id="checkbox_sql_structure" checked="checked" /> <label
|
||||||
<input type="checkbox" name="sql_structure" value="structure"
|
for="checkbox_sql_structure"> Structure</label> </legend></fieldset>
|
||||||
id="checkbox_sql_structure"
|
|
||||||
checked="checked" onclick="
|
|
||||||
if (!this.checked && !document.getElementById('checkbox_sql_data').checked)
|
|
||||||
return false;
|
|
||||||
else return true;" />
|
|
||||||
<label for="checkbox_sql_structure">
|
|
||||||
Structure</label>
|
|
||||||
</legend>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<fieldset>
|
<fieldset><legend> <input type="checkbox" name="sql_data" value="data"
|
||||||
<legend>
|
id="checkbox_sql_data" checked="checked" /> <label for="checkbox_sql_data">
|
||||||
|
<?php echo $langs->trans("Datas"); ?></label> </legend> <input
|
||||||
<input type="checkbox" name="sql_data" value="data"
|
type="checkbox" name="showcolumns" value="yes"
|
||||||
id="checkbox_sql_data" checked="checked" onclick="
|
id="checkbox_dump_showcolumns" /> <label
|
||||||
if (!this.checked && (!document.getElementById('checkbox_sql_structure') || !document.getElementById('checkbox_sql_structure').checked))
|
for="checkbox_dump_showcolumns"> <?php echo $langs->trans("NameColumn"); ?></label><br>
|
||||||
return false;
|
|
||||||
else return true;" />
|
|
||||||
<label for="checkbox_sql_data">
|
|
||||||
<?php echo $langs->trans("Datas"); ?></label>
|
|
||||||
</legend>
|
|
||||||
<input type="checkbox" name="showcolumns" value="yes"
|
|
||||||
id="checkbox_dump_showcolumns"
|
|
||||||
/>
|
|
||||||
<label for="checkbox_dump_showcolumns">
|
|
||||||
<?php echo $langs->trans("NameColumn"); ?></label><br>
|
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<fieldset id="latex_options">
|
|
||||||
<legend>Parametres export LaTeX</legend>
|
|
||||||
|
|
||||||
<div class="formelementrow">
|
|
||||||
<input type="checkbox" name="latex_caption" value="yes"
|
|
||||||
id="checkbox_latex_show_caption"
|
|
||||||
checked="checked" />
|
|
||||||
|
|
||||||
<label for="checkbox_latex_show_caption">
|
|
||||||
Inclure les sous-titres</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<legend>
|
|
||||||
<input type="checkbox" name="latex_structure" value="structure"
|
|
||||||
id="checkbox_latex_structure"
|
|
||||||
checked="checked" onclick="
|
|
||||||
if (!this.checked && !document.getElementById('checkbox_latex_data').checked)
|
|
||||||
return false;
|
|
||||||
else return true;" />
|
|
||||||
<label for="checkbox_latex_structure">
|
|
||||||
Structure</label>
|
|
||||||
|
|
||||||
</legend>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
<tr><td><label for="latex_structure_caption">
|
|
||||||
Sous-titre de la table</label></td>
|
|
||||||
<td><input type="text" name="latex_structure_caption" size="30"
|
|
||||||
value="Structure de la table __TABLE__"
|
|
||||||
id="latex_structure_caption" />
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td><label for="latex_structure_continued_caption">
|
|
||||||
|
|
||||||
Sous-titre de la table (suite)</label></td>
|
|
||||||
<td><input type="text" name="latex_structure_continued_caption"
|
|
||||||
value="Structure de la table __TABLE__ (suite)"
|
|
||||||
size="30" id="latex_structure_continued_caption" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td><label for="latex_structure_label">
|
|
||||||
Cle etiquette</label></td>
|
|
||||||
<td><input type="text" name="latex_structure_label" size="30"
|
|
||||||
value="tab:__TABLE__-structure"
|
|
||||||
id="latex_structure_label" />
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
|
||||||
<legend>
|
|
||||||
<input type="checkbox" name="latex_data" value="data"
|
|
||||||
id="checkbox_latex_data"
|
|
||||||
checked="checked" onclick="
|
|
||||||
if (!this.checked && (!document.getElementById('checkbox_latex_structure') || !document.getElementById('checkbox_latex_structure').checked))
|
|
||||||
return false;
|
|
||||||
else return true;" />
|
|
||||||
<label for="checkbox_latex_data">
|
|
||||||
Donnees</label>
|
|
||||||
|
|
||||||
</legend>
|
|
||||||
<input type="checkbox" name="latex_showcolumns" value="yes"
|
|
||||||
id="ch_latex_showcolumns"
|
|
||||||
checked="checked" />
|
|
||||||
<label for="ch_latex_showcolumns">
|
|
||||||
Nom des colonnes</label><br>
|
|
||||||
<table>
|
|
||||||
<tr><td><label for="latex_data_caption">
|
|
||||||
Sous-titre de la table</label></td>
|
|
||||||
<td><input type="text" name="latex_data_caption" size="30"
|
|
||||||
value="Contenu de la table __TABLE__"
|
|
||||||
id="latex_data_caption" />
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td><label for="latex_data_continued_caption">
|
|
||||||
Sous-titre de la table (suite)</label></td>
|
|
||||||
<td><input type="text" name="latex_data_continued_caption" size="30"
|
|
||||||
value="Contenu de la table __TABLE__ (suite)"
|
|
||||||
id="latex_data_continued_caption" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td><label for="latex_data_label">
|
|
||||||
|
|
||||||
Cle de l'etiquette</label></td>
|
|
||||||
<td><input type="text" name="latex_data_label" size="30"
|
|
||||||
value="tab:__TABLE__-data"
|
|
||||||
id="latex_data_label" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td><label for="latex_replace_null">
|
|
||||||
Remplacer NULL par</label></td>
|
|
||||||
<td><input type="text" name="latex_replace_null" size="20"
|
|
||||||
value="\textit{NULL}"
|
|
||||||
id="latex_replace_null" />
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</fieldset>
|
|
||||||
</fieldset>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<fieldset id="csv_options">
|
|
||||||
<input type="hidden" name="csv_data" value="csv_data" />
|
|
||||||
<legend>Parametres export CSV</legend>
|
|
||||||
|
|
||||||
<table>
|
|
||||||
|
|
||||||
<tr><td><label for="export_separator">
|
|
||||||
Champs termines par</label></td>
|
|
||||||
<td><input type="text" name="export_separator" size="2"
|
|
||||||
id="export_separator"
|
|
||||||
value=";" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td><label for="enclosed">
|
|
||||||
Champs entoures par</label></td>
|
|
||||||
<td><input type="text" name="enclosed" size="2"
|
|
||||||
id="enclosed"
|
|
||||||
value=""" />
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td><label for="escaped">
|
|
||||||
Caractere special</label></td>
|
|
||||||
<td><input type="text" name="escaped" size="2"
|
|
||||||
id="escaped"
|
|
||||||
value="\" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td><label for="add_character">
|
|
||||||
|
|
||||||
Lignes terminees par</label></td>
|
|
||||||
<td><input type="text" name="add_character" size="2"
|
|
||||||
id="add_character"
|
|
||||||
value="\r\n" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td><label for="csv_replace_null">
|
|
||||||
Remplacer NULL par</label></td>
|
|
||||||
<td><input type="text" name="csv_replace_null" size="20"
|
|
||||||
id="csv_replace_null"
|
|
||||||
value="NULL" />
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<input type="checkbox" name="showcsvnames" value="yes"
|
|
||||||
id="checkbox_dump_showcsvnames"
|
|
||||||
/>
|
|
||||||
<label for="checkbox_dump_showcsvnames">
|
|
||||||
Afficher les noms de champ en premiere ligne</label>
|
|
||||||
</fieldset>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<fieldset id="pdf_options">
|
|
||||||
<input type="hidden" name="pdf_data" value="pdf_data" />
|
|
||||||
|
|
||||||
<legend>Parametres export PDF</legend>
|
|
||||||
|
|
||||||
<div class="formelementrow">
|
|
||||||
<label for="pdf_report_title">Titre du rapport</label>
|
|
||||||
<input type="text" name="pdf_report_title" size="50"
|
|
||||||
value=""
|
|
||||||
id="pdf_report_title" />
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<fieldset id="none_options">
|
|
||||||
<legend>Options XML</legend>
|
|
||||||
Ce format ne comporte pas d'options <input type="hidden" name="xml_data" value="xml_data" />
|
|
||||||
</fieldset>
|
|
||||||
-->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</td></tr></table>
|
|
||||||
|
|
||||||
<script type="text/javascript" language="javascript">
|
|
||||||
//<![CDATA[
|
|
||||||
show_checked_option();
|
|
||||||
hide_them_all();
|
|
||||||
//]]>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<fieldset>
|
<fieldset><label for="filename_template"> <?php echo $langs->trans("FileNameToGenerate"); ?></label>
|
||||||
|
: <input type="text" name="filename_template" size="60"
|
||||||
<label for="filename_template">
|
id="filename_template"
|
||||||
<?php echo $langs->trans("FileNameToGenerate"); ?></label> :
|
|
||||||
<input type="text" name="filename_template" size="60" id="filename_template"
|
|
||||||
value="<?php
|
value="<?php
|
||||||
$prefix='dump';
|
$prefix='dump';
|
||||||
if ($db->label == 'MySQL') $prefix='mysqldump';
|
if ($db->label == 'MySQL') $prefix='mysqldump';
|
||||||
if ($db->label == 'PostgreSQL') $prefix='pg_dump';
|
if ($db->label == 'PostgreSQL') $prefix='pg_dump';
|
||||||
$file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M").'.sql';
|
$file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M").'.sql';
|
||||||
echo $file;
|
echo $file;
|
||||||
?>" />
|
?>" /> <br>
|
||||||
|
<br>
|
||||||
<br><br>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
@ -606,8 +299,7 @@ foreach($compression as $key => $val)
|
|||||||
{
|
{
|
||||||
if (! $val['function'] || function_exists($val['function']))
|
if (! $val['function'] || function_exists($val['function']))
|
||||||
{
|
{
|
||||||
print '<input type="radio" name="compression" value="'.$key.'" id="'.$val['id'].'"';
|
print '<input type="radio" name="compression" value="'.$key.'" id="'.$val['id'].'">';
|
||||||
print ' onclick="document.getElementById(\'checkbox_dump_asfile\').checked = true;" checked="checked" />';
|
|
||||||
print ' <label for="'.$val['id'].'">'.$val['label'].'</label>';
|
print ' <label for="'.$val['id'].'">'.$val['label'].'</label>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -622,52 +314,23 @@ foreach($compression as $key => $val)
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
?>
|
?></fieldset>
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
|
|
||||||
<center>
|
<center><input type="submit" class="button"
|
||||||
<input type="submit" class="button" value="<?php echo $langs->trans("GenerateBackup") ?>" id="buttonGo" /><br><br>
|
value="<?php echo $langs->trans("GenerateBackup") ?>" id="buttonGo" /><br>
|
||||||
|
<br>
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" language="javascript">
|
|
||||||
//<![CDATA[
|
|
||||||
|
|
||||||
|
|
||||||
// set current db, table and sql query in the querywindow
|
|
||||||
if (window.parent.refreshLeft) {
|
|
||||||
window.parent.reload_querywindow("","","");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (window.parent.frames[1]) {
|
|
||||||
// reset content frame name, as querywindow needs to set a unique name
|
|
||||||
// before submitting form data, and navigation frame needs the original name
|
|
||||||
if (window.parent.frames[1].name != 'frame_content') {
|
|
||||||
window.parent.frames[1].name = 'frame_content';
|
|
||||||
}
|
|
||||||
if (window.parent.frames[1].id != 'frame_content') {
|
|
||||||
window.parent.frames[1].id = 'frame_content';
|
|
||||||
}
|
|
||||||
//window.parent.frames[1].setAttribute('name', 'frame_content');
|
|
||||||
//window.parent.frames[1].setAttribute('id', 'frame_content');
|
|
||||||
}
|
|
||||||
//]]>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
$result=$formfile->show_documents('systemtools','backup',$conf->admin->dir_output.'/backup',$_SERVER['PHP_SELF'],0,1,'',1,0,0,54,0,'',$langs->trans("PreviousDumpFiles"));
|
$result=$formfile->show_documents('systemtools','backup',$conf->admin->dir_output.'/backup',$_SERVER['PHP_SELF'],0,1,'',1,0,0,54,0,'',$langs->trans("PreviousDumpFiles"));
|
||||||
//if ($result) print '<br><br>';
|
//if ($result) print '<br><br>';
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
@ -38,6 +38,22 @@ if (! $user->admin)
|
|||||||
|
|
||||||
llxHeader('','','EN:Restores|FR:Restaurations|ES:Restauraciones');
|
llxHeader('','','EN:Restores|FR:Restaurations|ES:Restauraciones');
|
||||||
|
|
||||||
|
?>
|
||||||
|
<script type="text/javascript" language="javascript">
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
jQuery("#mysql_options").<?php echo GETPOST('radio_dump')=='mysql_options'?'show()':'hide()'; ?>;
|
||||||
|
jQuery("#postgresql_options").<?php echo GETPOST('radio_dump')=='postgresql_options'?'show()':'hide()'; ?>;
|
||||||
|
|
||||||
|
jQuery("#radio_dump_mysql").click(function() {
|
||||||
|
jQuery("#mysql_options").show();
|
||||||
|
});
|
||||||
|
jQuery("#radio_dump_postgresql").click(function() {
|
||||||
|
jQuery("#postgresql_options").show();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("Restore"),'','setup');
|
print_fiche_titre($langs->trans("Restore"),'','setup');
|
||||||
|
|
||||||
print $langs->trans("RestoreDesc",DOL_DATA_ROOT).'<br><br>';
|
print $langs->trans("RestoreDesc",DOL_DATA_ROOT).'<br><br>';
|
||||||
@ -46,31 +62,9 @@ print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'<br><br>';
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Run on page load -->
|
|
||||||
<script type="text/javascript" language="javascript">
|
|
||||||
//<![CDATA[
|
|
||||||
function hide_them_all() {
|
|
||||||
document.getElementById("mysql_options").style.display = 'none';
|
|
||||||
// document.getElementById("csv_options").style.display = 'none';
|
|
||||||
// document.getElementById("latex_options").style.display = 'none';
|
|
||||||
// document.getElementById("pdf_options").style.display = 'none';
|
|
||||||
// document.getElementById("none_options").style.display = 'none';
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if (! empty($_GET["radio_dump"])) print "document.getElementById('mysql_options').style.display = 'block';";
|
|
||||||
?>
|
|
||||||
}
|
|
||||||
|
|
||||||
//]]>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<fieldset id="fieldsetexport">
|
<fieldset id="fieldsetexport">
|
||||||
|
<?php print '<legend>'.$langs->trans("DatabaseName").' : <b>'.$dolibarr_main_db_name.'</b></legend>'; ?>
|
||||||
<table><tr><td valign="top">
|
<table><tr><td valign="top">
|
||||||
<?php
|
|
||||||
print $langs->trans("DatabaseName").' : <b>'.$dolibarr_main_db_name.'</b><br>';
|
|
||||||
print '<br>';
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div id="div_container_exportoptions">
|
<div id="div_container_exportoptions">
|
||||||
<fieldset id="exportoptions">
|
<fieldset id="exportoptions">
|
||||||
@ -78,11 +72,6 @@ print '<br>';
|
|||||||
<div class="formelementrow">
|
<div class="formelementrow">
|
||||||
<input type="radio" name="what" value="mysql" id="radio_dump_mysql"
|
<input type="radio" name="what" value="mysql" id="radio_dump_mysql"
|
||||||
<?php echo ($_GET["radio_dump"]=='mysql_options'?' checked':''); ?>
|
<?php echo ($_GET["radio_dump"]=='mysql_options'?' checked':''); ?>
|
||||||
onclick="
|
|
||||||
if (this.checked) {
|
|
||||||
hide_them_all();
|
|
||||||
document.getElementById('mysql_options').style.display = 'block';
|
|
||||||
}; return true"
|
|
||||||
/>
|
/>
|
||||||
<label for="radio_dump_mysql">MySQL</label>
|
<label for="radio_dump_mysql">MySQL</label>
|
||||||
</div>
|
</div>
|
||||||
@ -130,11 +119,6 @@ if ($db->label == 'MySQL')
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script type="text/javascript" language="javascript">
|
|
||||||
//<![CDATA[
|
|
||||||
hide_them_all();
|
|
||||||
//]]>
|
|
||||||
</script>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -142,33 +126,9 @@ if ($db->label == 'MySQL')
|
|||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" language="javascript">
|
|
||||||
//<![CDATA[
|
|
||||||
|
|
||||||
|
|
||||||
// set current db, table and sql query in the querywindow
|
|
||||||
if (window.parent.refreshLeft) {
|
|
||||||
window.parent.reload_querywindow("","","");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (window.parent.frames[1]) {
|
|
||||||
// reset content frame name, as querywindow needs to set a unique name
|
|
||||||
// before submitting form data, and navigation frame needs the original name
|
|
||||||
if (window.parent.frames[1].name != 'frame_content') {
|
|
||||||
window.parent.frames[1].name = 'frame_content';
|
|
||||||
}
|
|
||||||
if (window.parent.frames[1].id != 'frame_content') {
|
|
||||||
window.parent.frames[1].id = 'frame_content';
|
|
||||||
}
|
|
||||||
//window.parent.frames[1].setAttribute('name', 'frame_content');
|
|
||||||
//window.parent.frames[1].setAttribute('id', 'frame_content');
|
|
||||||
}
|
|
||||||
//]]>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
@ -136,14 +136,14 @@ if ($what == 'mysql')
|
|||||||
$paramclear.=" -p".$dolibarr_main_db_pass;
|
$paramclear.=" -p".$dolibarr_main_db_pass;
|
||||||
}
|
}
|
||||||
|
|
||||||
print $langs->trans("RunCommandSummary").':<br>'."\n";
|
print '<b>'.$langs->trans("RunCommandSummary").':</b><br>'."\n";
|
||||||
print '<textarea rows="'.ROWS_2.'" cols="120">'.$command." ".$paramcrypted.'</textarea><br>'."\n";
|
print '<textarea rows="'.ROWS_2.'" cols="120">'.$command." ".$paramcrypted.'</textarea><br>'."\n";
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
// Now run command and show result
|
// Now run command and show result
|
||||||
print $langs->trans("BackupResult").': ';
|
print '<b>'.$langs->trans("BackupResult").':</b> ';
|
||||||
|
|
||||||
$errormsg='';
|
$errormsg='';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user