Index: extensions/db_backup/backups/.htaccess
===================================================================
--- extensions/db_backup/backups/.htaccess	(revision 3698)
+++ extensions/db_backup/backups/.htaccess	(revision 3698)
@@ -0,0 +1,2 @@
+order deny,allow
+deny from all
Index: extensions/db_backup/backups/index.php
===================================================================
--- extensions/db_backup/backups/index.php	(revision 3698)
+++ extensions/db_backup/backups/index.php	(revision 3698)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/db_backup/db_backup_admin.php
===================================================================
--- extensions/db_backup/db_backup_admin.php	(revision 3698)
+++ extensions/db_backup/db_backup_admin.php	(revision 3698)
@@ -0,0 +1,160 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+load_language('plugin.lang', DB_BACKUP_PATH);
+$chemin=DB_BACKUP_PATH . "backups";
+global $template;
+
+$template->set_filenames( array('db_backup_admin_content' => dirname(__FILE__).'/db_backup_admin.tpl') );
+
+function get_structure($db,$prefixe,$wholedb,$onlyHistory,$excludeHistory) {
+	$a=explode(";",list_tables($db,$prefixe,$wholedb,$onlyHistory,$excludeHistory));
+	foreach ($a as $table) { $SQL[]=segment_backup($table);}
+	return implode("\r", $SQL);
+}
+
+function list_tables($db,$prefixe,$wholedb,$onlyHistory,$excludeHistory) {
+	$tables = mysql_list_tables($db);
+	$result="";
+	while ($td = mysql_fetch_array($tables)) {
+		$table = $td[0];
+		if (!( (!$wholedb and strpos($table, $prefixe) !== 0) or ($onlyHistory and strpos($table, $prefixe . 'history') !== 0) or ($excludeHistory and strpos($table, $prefixe . 'history') === 0) )) {
+			$result.=$table.";";
+		}
+	}
+	return substr($result,0,-1);
+}
+
+function segment_backup($table) {
+	$r = mysql_query("SHOW CREATE TABLE `$table`");
+	if ($r) {
+		$insert_sql = "";
+		$d = mysql_fetch_array($r);
+		$d[1] .= ";";
+		$SQL[] = str_replace("\n", "", $d[1]);
+		$table_query = mysql_query("SELECT * FROM `$table`");
+		$num_fields = mysql_num_fields($table_query);
+		while ($fetch_row = mysql_fetch_array($table_query)) {
+			$insert_sql .= "INSERT INTO $table VALUES(";
+			for ($n=1;$n<=$num_fields;$n++) {
+				$m = $n - 1;
+				$insert_sql .= "'".mysql_real_escape_string($fetch_row[$m])."', ";
+			}
+			$insert_sql = substr($insert_sql,0,-2);
+			$insert_sql .= ");\n";
+			}
+		if ($insert_sql!= "\r") {
+			$SQL[] = $insert_sql;
+		}
+	}
+	return implode("\r", $SQL);
+}
+
+
+
+if (isset($_POST['submit'])) {
+
+	// *******************************************************************************************
+	if (($_POST['submit']==l10n('db_backup_erase'))&&(isset($_POST['db_backupfiles']))) {
+		unlink ($chemin.'/'.$_POST['db_backupfiles']);
+		array_push($page['infos'],l10n('db_backup_file').' "'.date('Y-m-d-H-i-s').'.sql" '.l10n('db_backup_erase_message'));
+	}
+	// *******************************************************************************************
+	if (($_POST['submit']==l10n('db_backup_download'))&&(isset($_POST['db_backupfiles']))) {
+		$File_url=$_POST['db_backupfiles'];
+		header("Content-disposition: attachment; filename=$File_url");
+		header("Content-Type: application/force-download");
+		header("Content-Transfer-Encoding: application/octet-stream\n");
+		header("Content-Length: ".filesize($chemin .'/'. $File_url));
+		header("Pragma: no-cache");
+		header("Cache-Control: must-revalidate, post-check=0, pre-check=0, public");
+		header("Expires: 0");
+		readfile($chemin .'/'. $File_url);
+	}
+	// *******************************************************************************************
+	if ($_POST['submit']==l10n('db_backup_dump')) {
+		$wholeDb = isset($_POST['wholeDb']) ? true : false;
+		$onlyHistory = isset($_POST['onlyHistory']) ? true : false;
+		$excludeHistory = isset($_POST['excludeHistory']) ? true : false;
+		$filename =$wholeDb ? $cfgBase."-" : "piwigo-";
+		$filename.=$onlyHistory ? "history-" : "";
+		$filename.=$excludeHistory ? "no-history-" : "";
+		$filename.=date('Y-m-d-H-i-s').".sql";
+
+		// step by step process initialisation
+		if (($_POST['submit'])&&(isset($_POST['step_by_step']))&&!(isset($_POST['tables']))) {
+			if (isset($_POST['saveToserver'])) {$template->assign('DB_BACKUP_SAVING_STEP','checked');}
+			$template->assign('DB_BACKUP_PROCESS',list_tables($cfgBase,$prefixeTable,$wholeDb,$onlyHistory,$excludeHistory));
+			$template->assign('DB_BACKUP_TABLE_QUANTITY',sizeof(explode(";",list_tables($cfgBase,$prefixeTable,$wholeDb,$onlyHistory,$excludeHistory))));
+			$template->assign('DB_BACKUP_TABLE_CURRENT',"0");
+			$template->assign('DB_BACKUP_TABLE_PERCENT',"0");
+			$template->assign('DB_BACKUP_FILENAME',$filename);
+		}
+		else
+		{
+			$result = get_structure($cfgBase,$prefixeTable,$wholeDb,$onlyHistory,$excludeHistory);
+			$template->assign('DB_BACKUP_SQL_OUTPUT', htmlspecialchars($result));
+			if (isset($_POST['saveToserver'])) {
+				$file=fopen($chemin."/".$filename,'x+');
+				fwrite($file, $result);
+				fclose($file);
+				array_push($page['infos'],l10n('db_backup_file').' "'.$filename.'" '.l10n('db_backup_dump_message'));
+			}
+		}
+	}
+}
+
+// step by step process start
+if ((isset($_POST['step_by_step']))&&(isset($_POST['tables'])))  {
+
+	$tables=explode(";",$_POST['tables']);
+	$filename=$_POST['filename'];
+	$template->assign('DB_BACKUP_FILENAME',$filename);
+	$table_quantity = isset($_POST['table_quantity']) ? $_POST['table_quantity'] : sizeof($tables);
+	$template->assign('DB_BACKUP_TABLE_QUANTITY',$table_quantity);
+	$template->assign('DB_BACKUP_TABLE_CURRENT',$_POST['table_current']+1);
+	$template->assign('DB_BACKUP_TABLE_PERCENT',floor((($_POST['table_current']+1)*100)/$table_quantity));
+
+	// step by step process end
+	if ($_POST['table_current']+1==$table_quantity){
+		if (isset($_POST['saveToserver'])) {
+			array_push($page['infos'],l10n('db_backup_file').' "'.$filename.'" '.l10n('db_backup_dump_message'));
+		}
+		$segment=segment_backup($tables[0]);
+		$template->assign('DB_BACKUP_SQL_OUTPUT',stripslashes($_POST['table_segment']).$segment);
+	}
+	// continue step by step process
+	else {
+		$toprocess=array_shift($tables);
+		$template->assign('DB_BACKUP_PROCESS',implode(";",$tables));
+		$segment=segment_backup($toprocess);
+		$template->assign('DB_BACKUP_TABLE_SEGMENT',stripslashes($_POST['table_segment']).$segment);
+	}
+
+	if (isset($_POST['saveToserver'])) {
+		$template->assign('DB_BACKUP_SAVING_STEP','checked');
+		$file=fopen($chemin."/".$filename,'a');
+		fwrite($file,$segment);
+		fclose($file);
+	}
+
+}
+
+
+
+// listing the backup files
+$backupfilesid=array();
+$dossier = opendir($chemin);
+while ($Fichier = readdir($dossier)) {
+  if ($Fichier != "." && $Fichier != ".." && $Fichier != "index.php" && $Fichier != ".htaccess") {
+	$nomFichier = $chemin."/".$Fichier;
+	array_push($backupfilesid,$Fichier);
+  }
+}
+closedir($dossier);
+$template->assign('db_backupfilesid', $backupfilesid);
+
+
+
+$template->assign_var_from_handle( 'ADMIN_CONTENT', 'db_backup_admin_content');
+?>
Index: extensions/db_backup/db_backup_admin.tpl
===================================================================
--- extensions/db_backup/db_backup_admin.tpl	(revision 3698)
+++ extensions/db_backup/db_backup_admin.tpl	(revision 3698)
@@ -0,0 +1,76 @@
+<div class="titrePage">
+  <h2>db backup</h2>
+</div>
+<p>{'db_backup_summary'|@translate}</p>
+
+{if $DB_BACKUP_PROCESS}
+<form method="post" action="{$TESTPLUGIN_F_ACTION}" class="general" id="stepbystepform" name="stepbystepform">
+<input type="text" name="table_quantity" value="{$DB_BACKUP_TABLE_QUANTITY}" style="display:none;" /><br />
+<input type="checkbox" name="saveToserver" {$DB_BACKUP_SAVING_STEP} style="display:none;" /><br />
+<textarea rows="10" cols="90" name="table_segment" style="display:none;" >{$DB_BACKUP_TABLE_SEGMENT}</textarea><br />
+<input type="text" name="filename" value="{$DB_BACKUP_FILENAME}" style="display:none;" /><br />
+<input type="text" name="table_current" value="{$DB_BACKUP_TABLE_CURRENT}" style="display:none;" /><br />
+<input type="checkbox" name="step_by_step" checked style="display:none;" />
+<textarea rows="10" cols="90" name="tables" style="display:none;" />{$DB_BACKUP_PROCESS}</textarea>
+<p>{'db_backup_processing'|@translate}</p>
+<div id="meterbox" style="z-index:0;height:11px;width:95%;padding:3px;border:1px solid #ff3366;margin:0 auto;">
+<div id="meter" style="height:11px;background-color:#ff3366;width:{$DB_BACKUP_TABLE_PERCENT}%;text-align:center;"></div>
+<div style="height:11px;width:80%;padding-left:50%;z-index:4;position:relative;top:-11px;font-size:7pt;color:white">{$DB_BACKUP_TABLE_PERCENT} %</div>
+</div>
+<noscript><p><input type="submit" value="{'db_backup_continue_process'|@translate}"  /></p></noscript>
+<script LANGUAGE="JavaScript">setTimeout("document.stepbystepform.submit()",200);</script>
+</form>
+{else}
+
+<form method="post" action="{$TESTPLUGIN_F_ACTION}" class="general" id="dbbackupform" name="dbbackupform">
+{if !empty($db_backupfilesid)}
+<fieldset>
+		<legend>{'db_backup_existing_section'|@translate}</legend>
+<table>
+	<tr><td>
+		<select name="db_backupfiles" size="{if (($db_backupfilesid|@count)<4)}4{else}{$db_backupfilesid|@count}{/if}" style="float:left;margin-right:10px;">
+		{html_options output=$db_backupfilesid values=$db_backupfilesid }
+		</select></p><p style="float:left;">
+	</td><td>
+		<input type="submit" value="{'db_backup_erase'|@translate}" name="submit" />
+		<br /><br />
+		<input type="submit" value="{'db_backup_download'|@translate}" name="submit" />
+	</td></tr>
+</table>
+
+</fieldset>
+{/if}
+
+<table>
+  <tr>
+	<td>{'db_backup_whole_db'|@translate}</td>
+	<td><input type="checkbox" name="wholeDb" onClick="if (this.checked) {ldelim}document.getElementById('onlyHistory').checked=false;}"/></td>
+  </tr>
+  <tr>
+	<td>{'db_backup_only_history'|@translate}</td>
+	<td><input type="checkbox" id="onlyHistory" name="onlyHistory" onClick="if (this.checked) {ldelim}document.getElementById('excludeHistory').checked=false;document.getElementById('wholeDb').checked=false;}"  /></td>
+  </tr>
+  <tr>
+	<td>{'db_backup_exclude_history'|@translate}</td>
+	<td><input type="checkbox" id="excludeHistory" name="excludeHistory" onClick="if (this.checked) {ldelim}document.getElementById('onlyHistory').checked=false;}"  /></td>
+  </tr>
+  <tr>
+	<td>{'db_backup_save_to_server'|@translate}</td>
+	<td><input type="checkbox" name="saveToserver" /></td>
+  </tr>
+  <tr>
+  	<td>{'db_backup_step_by_step'|@translate}</td>
+  	<td><input type="checkbox" name="step_by_step" /></td>
+  </tr>
+</table>
+<p><input type="submit" value="{'db_backup_dump'|@translate}" name="submit" /></p>
+
+{if $DB_BACKUP_SQL_OUTPUT}
+	<fieldset>
+		<legend>{'db_backup_output_section'|@translate}</legend>
+
+		<p><textarea rows="30" cols="90" name="text" id="text" style="width:99%">{$DB_BACKUP_SQL_OUTPUT}</textarea></p>
+	</fieldset>
+{/if}
+</form>
+{/if}
Index: extensions/db_backup/index.php
===================================================================
--- extensions/db_backup/index.php	(revision 3698)
+++ extensions/db_backup/index.php	(revision 3698)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/db_backup/language/en_UK/index.php
===================================================================
--- extensions/db_backup/language/en_UK/index.php	(revision 3698)
+++ extensions/db_backup/language/en_UK/index.php	(revision 3698)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/db_backup/language/en_UK/plugin.lang.php
===================================================================
--- extensions/db_backup/language/en_UK/plugin.lang.php	(revision 3698)
+++ extensions/db_backup/language/en_UK/plugin.lang.php	(revision 3698)
@@ -0,0 +1,42 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+$lang['db_backup_summary'] 			= 'Backup tables from piwigo database';
+$lang['db_backup_dump_message'] 	= 'saved on server';
+$lang['db_backup_file'] 			= 'file';
+$lang['db_backup_erase_message'] 	= 'deleted from server';
+$lang['db_backup_save_to_server'] 	= 'Save on server';
+$lang['db_backup_existing_section']	= 'Existing backups';
+$lang['db_backup_output_section'] 	= 'Result';
+$lang['db_backup_dump'] 			= 'Do backup';
+$lang['db_backup_erase'] 			= 'Delete';
+$lang['db_backup_download'] 		= 'Download';
+$lang['db_backup_only_history'] 	= 'Only backup history';
+$lang['db_backup_exclude_history'] 	= 'Don\'t backup history';
+$lang['db_backup_whole_db'] 		= 'Include all database tables';
+$lang['db_backup_continue_process'] = 'Continue backup';
+$lang['db_backup_processing'] 		= 'Processing backup ....';
+$lang['db_backup_step_by_step'] 	= 'Backup database a table at a time';
+$lang['db_backup_compress_backup'] 	= 'Compress (zip) file';
+?>
Index: extensions/db_backup/language/fr_FR/index.php
===================================================================
--- extensions/db_backup/language/fr_FR/index.php	(revision 3698)
+++ extensions/db_backup/language/fr_FR/index.php	(revision 3698)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/db_backup/language/fr_FR/plugin.lang.php
===================================================================
--- extensions/db_backup/language/fr_FR/plugin.lang.php	(revision 3698)
+++ extensions/db_backup/language/fr_FR/plugin.lang.php	(revision 3698)
@@ -0,0 +1,42 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+$lang['db_backup_summary'] 			= 'Sauvegardez les tables de la base de données de piwigo';
+$lang['db_backup_dump_message'] 	= 'sauvegardé sur le serveur';
+$lang['db_backup_file'] 			= 'fichier';
+$lang['db_backup_erase_message'] 	= 'supprimé du serveur';
+$lang['db_backup_save_to_server'] 	= 'Archiver sur le serveur';
+$lang['db_backup_existing_section']	= 'Backups existants';
+$lang['db_backup_output_section'] 	= 'Résultat';
+$lang['db_backup_dump'] 			= 'Faire une sauvegarde';
+$lang['db_backup_erase'] 			= 'Effacer';
+$lang['db_backup_download'] 		= 'Télécharger';
+$lang['db_backup_only_history'] 	= 'Sauvegarder uniquement l\'historique';
+$lang['db_backup_exclude_history'] 	= 'Exclure l\'historique';
+$lang['db_backup_whole_db'] 		= 'Inclure les autres tables de la base';
+$lang['db_backup_continue_process'] = 'Continuez la sauvegarde';
+$lang['db_backup_processing'] 		= 'Sauvegarde en cours ....';
+$lang['db_backup_step_by_step'] 	= 'Sauvegardez une table à la fois';
+$lang['db_backup_compress_backup'] 	= 'Compresser (zipper) le fichier';
+?>
Index: extensions/db_backup/language/index.php
===================================================================
--- extensions/db_backup/language/index.php	(revision 3698)
+++ extensions/db_backup/language/index.php	(revision 3698)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/db_backup/language/it_IT/index.php
===================================================================
--- extensions/db_backup/language/it_IT/index.php	(revision 3698)
+++ extensions/db_backup/language/it_IT/index.php	(revision 3698)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: extensions/db_backup/language/it_IT/plugin.lang.php
===================================================================
--- extensions/db_backup/language/it_IT/plugin.lang.php	(revision 3698)
+++ extensions/db_backup/language/it_IT/plugin.lang.php	(revision 3698)
@@ -0,0 +1,44 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+$lang['db_backup_summary'] 			= 'Salvare le tabelle della base dati di Piwigo';
+$lang['db_backup_dump_message'] 	= 'Salvato sul server';
+$lang['db_backup_file'] 			= 'File';
+$lang['db_backup_erase_message'] 	= 'Cancellato dal server';
+$lang['db_backup_save_to_server'] 	= 'Archiviato sul server';
+$lang['db_backup_existing_section']	= 'Backups esistenti';
+$lang['db_backup_output_section'] 	= 'Risultato';
+$lang['db_backup_dump'] 			= 'Fare una salvaguardia';
+$lang['db_backup_erase'] 			= 'Cancellare';
+$lang['db_backup_download'] 		= 'Scaricare';
+$lang['db_backup_only_history'] 	= 'Salvare la cronologia unicamente';
+$lang['db_backup_exclude_history'] 	= 'Escludere la cronologia';
+$lang['db_backup_whole_db'] 		= 'Includere le altre tabelle della base dati';
+$lang['db_backup_continue_process'] = 'Proseguire con il backup';
+$lang['db_backup_processing']   	= 'Backup in corso ....';
+$lang['db_backup_step_by_step']  	= 'Salvaguardare una tabella alla volta';
+$lang['db_backup_compress_backup'] 	= 'Comprimere (zippare) il file';
+
+
+?>
Index: extensions/db_backup/main.inc.php
===================================================================
--- extensions/db_backup/main.inc.php	(revision 3698)
+++ extensions/db_backup/main.inc.php	(revision 3698)
@@ -0,0 +1,57 @@
+<?php
+/*
+Plugin Name: db backup
+Version: 2.0.1
+Description: Backup your database (piwigo version)
+Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=240
+Author: Repié38
+Author URI: http://www.pierre-b.com
+*/
+
+/*
+Changelog :
+
+v1.0 : initial release
+
+v1.1 : 	-bugs fix (thanks to P@t)
+		-.htaccess protection for /backups/ folder
+		-add checkbox to exclude or isolate history table, and to backup the whole db or just piwigo tables
+		-add infos in the filename (according to precendent point)
+		-moved down output field for readability
+
+v1.2 : 	-Code cleaning (thanks to P@t)
+		-bug fix with history (now, history means *history and *history_summary)
+		-little corrections in filenames (and $page['infos'])
+		-javascript to avoid "only history + whole database" -> no more possible with code simplification
+
+v1.3 :	-admin tpl fix
+
+v2.0 :  -new name for 1.3 for piwigo
+
+v2.0.a: -italian translation (thanks to rio)
+
+v2.0.1 : -new feature : step by step backup
+
+
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+define('DB_BACKUP_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
+
+
+function db_backup_menu($menu)
+{
+	array_push($menu,
+		array(
+			'NAME' => 'db backup',
+			'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/db_backup_admin.php')
+		)
+	);
+	return $menu;
+}
+
+
+add_event_handler('get_admin_plugin_menu_links', 'db_backup_menu' );
+
+
+?>
