Index: /extensions/Download_Multi/admin/admin.php
===================================================================
--- /extensions/Download_Multi/admin/admin.php	(revision 3986)
+++ /extensions/Download_Multi/admin/admin.php	(revision 3986)
@@ -0,0 +1,164 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Mod Name : Download_multi                                             |
+// | Mod Version : 0.9-1                                                   |
+// | Mod Orignal author: Tboris                                            |
+// | Mod Second author : Cestlodovic                                       |
+// | Mod Version author : FlipFlip <flipflip@free.fr>                      |
+// | Mod description :                                                     |
+// | Ce module est base sur le module existant pour le telechargement,     |
+// | cette version permet le telechargement sur plusieurs pages.           |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+check_status(ACCESS_ADMINISTRATOR);
+
+$DownloadMulti = get_plugin_data($plugin_id);
+global $template, $lang, $page;
+
+// Si le formulaire est posté
+// alors on écrit la configuration
+if (isset($_POST['downloadmulti_post_form']) == 1) {
+  if (empty($_POST['downloadmulti_group'])) {
+    array_push($page['errors'], $lang['dl_error_group_id']);
+  }
+
+  if (empty($_POST['downloadmulti_archive_size'])) {
+    array_push($page['errors'], $lang['dl_error_file_size']);
+  }
+
+  if(preg_match('/[^0-9]/', $_POST['downloadmulti_archive_size'])) {
+    array_push($page['errors'], $lang['dl_error_file_size_car']);
+  }
+
+  if(preg_match('/[^a-z0-9\-_]/', $_POST['downloadmulti_prefix'])) {
+    array_push($page['errors'], $lang['dl_zip_prefix_car']);
+  }
+
+  if(preg_match('/[^a-z0-9\-_\[\]]/', $_POST['downloadmulti_pattern_name'])) {
+    array_push($page['errors'], $lang['dl_zip_pattern_name_car']);
+  }
+ 
+  if (empty($_POST['downloadmulti_pattern_name'])) {
+    array_push($page['errors'], $lang['dl_error_pattern_name']);
+  }
+   
+  if(preg_match('/[^a-z0-9\-_]/', $_POST['downloadmulti_prefix_dir'])) {
+    array_push($page['errors'], $lang['dl_zip_dir_prefix_car']);
+  }
+  // Si il n'y a pas d'erreurs
+  if (count($page['errors']) == 0) {
+    if(isset($_POST['downloadmulti_active_comment'])) {
+      $downloadmulti_active_comment = 'on';
+    } else {
+      $downloadmulti_active_comment = '';
+    }
+    
+    if(isset($_POST['downloadmulti_create_category'])) {
+      $downloadmulti_create_category = 'on';
+    } else {
+      $downloadmulti_create_category = '';
+    }
+        
+    $DownloadMulti->my_config['active_comment'] = $downloadmulti_active_comment;
+    $DownloadMulti->my_config['comment'] = $_POST['downloadmulti_comment'];
+    $DownloadMulti->my_config['group_id'] = $_POST['downloadmulti_group'];    
+    $DownloadMulti->my_config['archive_size'] = $_POST['downloadmulti_archive_size'];
+    $DownloadMulti->my_config['prefix'] = $_POST['downloadmulti_prefix'];
+    $DownloadMulti->my_config['prefix_dir'] = $_POST['downloadmulti_prefix_dir'];
+    $DownloadMulti->my_config['pattern_name'] = $_POST['downloadmulti_pattern_name'];
+    $DownloadMulti->my_config['select_dl'] = $_POST['downloadmulti_select_dl'];
+    $DownloadMulti->my_config['create_category'] = $downloadmulti_create_category;
+    $DownloadMulti->save_config();
+
+    array_push($page['infos'], $lang['dl_backup_config']);
+  }
+}
+
+if(isset($DownloadMulti->my_config['active_comment'])) { $active_comment = $DownloadMulti->my_config['active_comment']; }
+if(isset($DownloadMulti->my_config['comment'])) { $comment = $DownloadMulti->my_config['comment']; }
+if(isset($DownloadMulti->my_config['archive_size'])) { $archive_size = $DownloadMulti->my_config['archive_size']; }
+if(isset($DownloadMulti->my_config['prefix'])) { $prefix = $DownloadMulti->my_config['prefix']; }
+if(isset($DownloadMulti->my_config['prefix_dir'])) { $prefix_dir = $DownloadMulti->my_config['prefix_dir']; }
+if(isset($DownloadMulti->my_config['pattern_name'])) { $pattern_name = $DownloadMulti->my_config['pattern_name']; }
+if(isset($DownloadMulti->my_config['select_dl'])) { $select_dl = $DownloadMulti->my_config['select_dl']; }
+if(isset($DownloadMulti->my_config['group_id'])) { $group_id = $DownloadMulti->my_config['group_id']; }
+if(isset($DownloadMulti->my_config['create_category'])) { $create_category = $DownloadMulti->my_config['create_category']; }
+
+if(!isset($active_comment)) { $active_comment = ''; }
+if(!isset($comment)) { $comment = ''; }
+if(!isset($archive_size)) { $archive_size = ''; }
+if(!isset($prefix)) { $prefix = ''; }
+if(!isset($prefix_dir)) { $prefix_dir = ''; }
+if(!isset($pattern_name)) { $pattern_name = ''; }
+if(!isset($select_dl)) { $select_dl = ''; }
+if(!isset($group_id)) { $group_id = ''; }
+if(!isset($create_category)) { $create_category = ''; }
+
+// +-----------------------------------------------------------------------+
+// |                            template initialization
+// +-----------------------------------------------------------------------+
+$template->set_filenames(array('plugin_admin_content' => $DownloadMulti->plugin_path.'template/admin.tpl'));
+
+if(!class_exists('zipArchive')) {
+  array_push($page['errors'], $lang['dl_class_exist']);
+}
+
+$template->assign(array(
+  'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin&amp;section=download_multi%2Fadmin%2Fadmin.php',
+  'DOWNLOADMULTI_ACTIVECOMMENT' => $active_comment ? 'checked="checked"' : '',
+  'DOWNLOADMULTI_COMMENT' => $comment,
+  'DOWNLOADMULTI_ARCHIVE_SIZE' => $archive_size,
+  'DOWNLOADMULTI_PREFIX' => $prefix,
+  'DOWNLOADMULTI_PREFIX_DIR' => $prefix_dir,
+  'DOWNLOADMULTI_PATTERN_NAME' => $pattern_name,
+  'DOWNLOADMULTI_CREATECATEGORY' => $create_category ? 'checked="checked"' : '',
+));
+
+// Gestion des groupes
+$query = '
+SELECT id, name
+  FROM '.$prefixeTable.'groups
+  ORDER BY name ASC
+;';
+$result = pwg_query($query);
+
+while ($row = mysql_fetch_array($result)) {
+  $groupe_id[] = $row['id'];
+  $groupe_name[] = $row['name'];
+}
+
+$template->assign('downloadmulti_group_id', $groupe_id);
+$template->assign('downloadmulti_group_name', $groupe_name);
+$template->assign('downloadmulti_group_select', $group_id);
+
+// Gestion des formats de téléchargement par défaut
+$template->assign('downloadmulti_select_dl',
+              array(
+                  'thumbnail' => $lang['dl_thumbnail'],
+                  'normal' => $lang['dl_normal'],
+                  'high' => $lang['dl_high']
+                  )
+                );
+$template->assign('select_dl', $select_dl);
+				
+// Chargement de la configuration du serveur
+$DownloadMulti->DmServeurConfiguration();
+
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+?>
Index: /extensions/Download_Multi/admin/index.php
===================================================================
--- /extensions/Download_Multi/admin/index.php	(revision 3986)
+++ /extensions/Download_Multi/admin/index.php	(revision 3986)
@@ -0,0 +1,35 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch        : BSF (Best So Far)
+// | file          : $RCSfile$
+// | last update   : $Date: 2006-07-18 23:38:54 +0200 (mar., 18 juil. 2006) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1481 $
+// +-----------------------------------------------------------------------+
+// | 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 of index.php
+
+$url = '../index.php';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Download_Multi/include/DmPanier.php
===================================================================
--- /extensions/Download_Multi/include/DmPanier.php	(revision 3986)
+++ /extensions/Download_Multi/include/DmPanier.php	(revision 3986)
@@ -0,0 +1,110 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Mod Name : Download_multi                                             |
+// | Mod Version : 0.9-1                                                   |
+// | Mod Orignal author: Tboris                                            |
+// | Mod Second author : Cestlodovic                                       |
+// | Mod Version author : FlipFlip <flipflip@free.fr>                      |
+// | Mod description :                                                     |
+// | Ce module est base sur le module existant pour le telechargement,     |
+// | cette version permet le telechargement sur plusieurs pages.           |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+//--------------------------------------------------------------------- include
+define('PHPWG_ROOT_PATH','../../../');
+include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
+
+check_status(ACCESS_CLASSIC);
+
+// Récupération de la class du plugin
+$DownloadMulti = get_plugin_data('download_multi');
+
+$title = ' Download Multi : Panier';
+$page['body_id'] = 'DownloadMulti';
+$page['section'] = '';
+include(PHPWG_ROOT_PATH.'include/page_header.php');
+
+// include menubar
+include(PHPWG_ROOT_PATH.'include/menubar.inc.php');
+
+$template->set_filenames(
+  array('DownloadMulti_panier' => $DownloadMulti->plugin_path.'/template/DmPanier.tpl')
+);
+
+if(isset($_GET['DmAction'])) {
+  $DmAction = $_GET['DmAction'];
+}
+
+if(isset($_POST['DmPanier'])) {
+  $url = get_root_url().$_POST['DmPanier'];
+}
+
+$template->assign('preview',
+  array(
+    'U_HOME' => duplicate_index_URL(),
+    'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=download_multi'
+  )
+);
+
+if(isset($DmAction)) {
+  switch($DmAction) {
+    // Formulaire pour choisir
+    // un préfix différent que
+    // celui par défaut
+    case 'name':
+      $DownloadMulti->DmPanierPrefixZip();
+    break;
+
+    // Génération des fichiers zip
+    case 'genfic':
+  	  if(isset($_POST['nom'])) {
+        $prefix = $_POST['nom'];
+      }
+      $DownloadMulti->DmPanierGenZip($prefix);
+    break;
+
+    // Liste le répertoire utilisateur
+    case 'liste':
+      $DownloadMulti->DmPanierListeDir();
+    break;
+
+    // Vide les archives
+    case 'del':
+  	  if(isset($_POST['fic'])) {
+        $fic = $_POST['fic'];
+      }
+      $DownloadMulti->DmPanierDelUserDir($fic);
+      $DownloadMulti->DmPanierListeDir();
+    break;
+
+    // Vide le panier
+    case 'delcart':
+      $DownloadMulti->DmPanierDelete();
+    break;
+
+    default:
+      $DownloadMulti->DmPanierListeDir();
+    break;
+  }
+} else {
+  $DownloadMulti->DmPanierListeDir();
+}
+
+$template->parse('DownloadMulti_panier');
+
+include(PHPWG_ROOT_PATH.'include/page_tail.php');
+?>
Index: /extensions/Download_Multi/include/DmPreview.php
===================================================================
--- /extensions/Download_Multi/include/DmPreview.php	(revision 3986)
+++ /extensions/Download_Multi/include/DmPreview.php	(revision 3986)
@@ -0,0 +1,88 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Mod Name : Download_multi                                             |
+// | Mod Version : 0.9-1                                                   |
+// | Mod Orignal author: Tboris                                            |
+// | Mod Second author : Cestlodovic                                       |
+// | Mod Version author : FlipFlip <flipflip@free.fr>                      |
+// | Mod description :                                                     |
+// | Ce module est base sur le module existant pour le telechargement,     |
+// | cette version permet le telechargement sur plusieurs pages.           |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+//--------------------------------------------------------------------- include
+define('PHPWG_ROOT_PATH','../../../');
+include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
+
+check_status(ACCESS_CLASSIC);
+
+//----------------------------------------------------- template initialization
+//
+// Start output of page
+//
+$title = ' Download Multi : Panier';
+$page['body_id'] = 'DownloadMulti';
+$page['section'] = '';
+include(PHPWG_ROOT_PATH.'include/page_header.php');
+
+// Récupération de la class du plugin
+$DownloadMulti = get_plugin_data('download_multi');
+
+$template->set_filenames(
+  array('DownloadMulti_preview' => $DownloadMulti->plugin_path.'/template/DmPreview.tpl')
+);
+
+if(isset($_POST['action'])) {
+  $action = $_POST['action'];
+} else {
+  $action = '';
+}
+
+if(isset($_POST['DmCategory'])) {
+  $url = get_root_url().$_POST['DmCategory'];
+}
+
+$template->assign(
+      'preview',
+        array(
+          'U_HOME' => make_index_url(),
+          'U_HELP' => get_root_url().'popuphelp.php?page=download_multi',
+        )
+      );
+
+switch($action) {
+  case 'del':
+    // Supprime une image du panier
+    $id_image = $_POST['id_image'];
+    $type = $_POST['type'];
+    $DownloadMulti->DmPreviewDel($id_image, $type);
+    $DownloadMulti->DmPreviewList();
+  break;
+
+  default:
+    // Affiche la liste des images
+    // dans le panier de l'utilisateur
+    $DownloadMulti->DmPreviewList();
+  break;
+}
+
+// include menubar
+include(PHPWG_ROOT_PATH.'include/menubar.inc.php');
+
+$template->parse('DownloadMulti_preview');
+include(PHPWG_ROOT_PATH.'include/page_tail.php');
+?>
Index: /extensions/Download_Multi/include/DownloadMulti.css
===================================================================
--- /extensions/Download_Multi/include/DownloadMulti.css	(revision 3986)
+++ /extensions/Download_Multi/include/DownloadMulti.css	(revision 3986)
@@ -0,0 +1,8 @@
+.content-progress {
+  background-color: transparent;
+  margin: 21px 7px 0 290px;
+}
+
+.dl p {
+  text-align: left;
+}
Index: /extensions/Download_Multi/include/DownloadMulti.js
===================================================================
--- /extensions/Download_Multi/include/DownloadMulti.js	(revision 3986)
+++ /extensions/Download_Multi/include/DownloadMulti.js	(revision 3986)
@@ -0,0 +1,36 @@
+/*
+// +-----------------------------------------------------------------------+
+// | Mod Name : Download_multi                                             |
+// | Mod Version : 0.9-1                                                   |
+// | Mod Orignal author: Tboris                                            |
+// | Mod Second author : Cestlodovic                                       |
+// | Mod Version author : FlipFlip <flipflip@free.fr>                      |
+// | Mod description :                                                     |
+// | Ce module est base sur le module existant pour le telechargement,     |
+// | cette version permet le telechargement sur plusieurs pages.           |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+ */
+
+function cocher(formulaire) {
+  /* Sélection uniquement des case à cocher
+     dans la liste des images */
+  var formu = document.getElementById(formulaire);
+  for ( n=0;n<formu.elements.length;n++ ) {
+    if (formu.elements[n].type=="checkbox") {
+      formu.elements[n].checked="true";
+    }
+  }
+}
Index: /extensions/Download_Multi/include/class.inc.php
===================================================================
--- /extensions/Download_Multi/include/class.inc.php	(revision 3986)
+++ /extensions/Download_Multi/include/class.inc.php	(revision 3986)
@@ -0,0 +1,1070 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Mod Name : Download_multi                                             |
+// | Mod Version : 0.9-1                                                   |
+// | Mod Orignal author: Tboris                                            |
+// | Mod Second author : Cestlodovic                                       |
+// | Mod Version author : FlipFlip <flipflip@free.fr>                      |
+// | Mod description :                                                     |
+// | Ce module est base sur le module existant pour le telechargement,     |
+// | cette version permet le telechargement sur plusieurs pages.           |
+// +-----------------------------------------------------------------------+
+// | 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.               '                                                  |
+// +-----------------------------------------------------------------------+
+
+class DownloadMulti {
+  var $plugin_name, $plugin_path, $plugin_url;
+  var $my_config;
+
+  function DownloadMulti($plugin_name, $plugin_path, $plugin_url) {
+    // Args
+    $this->plugin_name = $plugin_name;
+    $this->plugin_path = $plugin_path;
+    $this->plugin_url = $plugin_url;
+    // handler
+    $this->initialize_event_handler($plugin_name, $plugin_path, $plugin_url);
+  }
+
+  function initialize_event_handler() {
+    global $user;
+    $this->load_config(); // Chargement de la configuration
+    $this->load_lang(); // Chargement des langues
+
+    if ($user['status'] != 'guest' AND !empty($this->my_config['group_id'])) {
+      // Récupération du groupe utilisateur autorisé à télécharger les images
+      $query = '
+        SELECT group_id
+        FROM '.USER_GROUP_TABLE.'
+        WHERE user_id = '.$user['id'].'
+      ;';
+      $result = pwg_query($query);
+
+      // Parcours la requête SQL
+      while($row = mysql_fetch_array($result)) {
+        if(in_array($row['group_id'], $this->my_config['group_id'])) {
+          // Mise à jour du panier
+          add_event_handler('loc_begin_index', array(&$this, 'DmCart'));
+
+          // Ajout d'élements dans le header
+          // Ne pas inclure dans les pages d'administration
+          add_event_handler('loc_end_page_header', array(&$this, 'DmHeader'));
+
+          // Ajout une entrée dans le menubar
+          add_event_handler('blockmanager_apply', array(&$this, 'DmMenubar'));
+          add_event_handler('blockmanager_register_blocks', array(&$this, 'register_dm_menubar_blocks'));
+
+          // ---- Thumbnail
+          // Entrée HTML du formulaire pour la sélection des images
+          add_event_handler('loc_begin_index_thumbnails', array(&$this, 'DmFormThumbnail'));
+
+          // Affichage des cases à cocher sous les vignettes
+          add_event_handler('loc_end_index_thumbnails', array($this, 'DmCategoryThumbnail'), 50, 2);
+
+          // Affichage du cadre en bas de thumbnail.tpl
+          add_event_handler('loc_begin_index_thumbnails', array(&$this, 'DmCategoryDefault'));
+
+          if (script_basename() == 'popuphelp') {
+            // ---- Aide
+            add_event_handler('get_popup_help_content', array(&$this, 'get_popup_help_content'), EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
+          }
+        }
+      }
+    }
+
+    if (is_admin()) {
+      // ---- Administration
+      add_event_handler('get_admin_plugin_menu_links', array(&$this, 'plugin_admin_menu')); // Menu d'administration
+    }
+  }
+
+  /* this function initialize var $my_config with default values */
+  function init_config() {
+    $this->my_config = array();
+  }
+
+  //Chargement de la configuration
+  function load_config() {
+    $this->init_config();
+
+    $query = '
+      SELECT value
+      FROM '.CONFIG_TABLE.'
+      WHERE param = \'downloadmulti_config\'
+    ;';
+
+    $result = pwg_query($query);
+
+    if($result) {
+      $row = mysql_fetch_row($result);
+      if(is_string($row[0])) {
+        $config = unserialize($row[0]);
+        reset($config);
+        while (list($key, $val) = each($config)) {
+          $this->my_config[$key] = $val;
+        }
+      }
+    }
+  }
+
+  // Sauvegarde de la configuration
+  function save_config() {
+    $query = '
+      REPLACE INTO '.CONFIG_TABLE.'
+      VALUES(
+        \'downloadmulti_config\',
+        \''.serialize($this->my_config).'\',
+        \'Configuration de Download Multi\')
+    ;';
+
+    $result = pwg_query($query);
+
+    if($result) {
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  // Affichage du lien dans la barre
+  // menu administrateur
+  function plugin_admin_menu($menu) {
+    array_push($menu,
+      array(
+        'NAME' => 'Download Multi',
+        'URL' => get_admin_plugin_menu_link($this->plugin_path.'admin/admin.php')
+      )
+    );
+    return $menu;
+  }
+
+  // Chargement des fichiers langues
+  function load_lang() {
+    load_language('plugin.lang', $this->plugin_path);
+  }
+
+  // Gestion de l'aide pour le plugin
+  function get_popup_help_content($popup_help_content, $page) {
+    if (in_array($page, array($this->plugin_name, 'DownloadMulti'))) {
+      $help_content =
+        load_language('help/'.$page.'.html', $this->plugin_path, array('return'=>true));
+    } else {
+      $help_content = false;
+    }
+
+    if ($help_content == false) {
+      return $popup_help_content;
+    } else {
+      return $popup_help_content.$help_content;
+    }
+  }
+
+  // Enregistrement du menu pour la gestion dans l'administration
+  function register_dm_menubar_blocks($menu_ref_arr) {
+    $menu = & $menu_ref_arr[0];
+    if ($menu->get_id() != 'menubar')
+      return;
+    $menu->register_block(new RegisteredBlock('mbDownloadMulti', 'Download Multi', 'DM'));
+  }
+
+  // Chargement de fichier dans l'entête du template
+  function DmHeader() {
+    global $template;
+
+    $DmUrlJs = get_root_url().'plugins/'.$this->plugin_name.'/include/DownloadMulti.js';
+    $DmUrlCss = get_root_url().'plugins/'.$this->plugin_name.'/include/DownloadMulti.css';
+    $template->append(
+        'head_elements',
+        '<script type="text/javascript" src="'.$DmUrlJs.'"></script>'."\n".
+        '<link rel="stylesheet" type="text/css" href="'.$DmUrlCss.'">'."\n"
+    );
+  }
+
+  // Gestion de l'affichage dans le menubar
+  function DmMenuBar($menu_ref_arr) {
+  	global $template;
+
+    $menu = & $menu_ref_arr[0];
+
+    $template->assign('NBIMAGES', $this->DmCountCart());
+
+    if (($block = $menu->get_block( 'mbDownloadMulti' )) != null) {
+      $block->set_title('Download Multi');
+      $block->template = $this->plugin_path.'template/DmMenu.tpl';
+    }
+  }
+
+  // Compte le nombre d'images selectionné
+  // dans le panier du visiteur
+  function DmCountCart() {
+	global $prefixeTable, $user, $lang;
+
+    $query = '
+      SELECT COUNT(*) AS nb_line
+      FROM '.$prefixeTable.'download_multi
+      WHERE id_user = '.$user['id'].'
+    ;';
+    $row = mysql_fetch_array(pwg_query($query));
+
+    // Si le nombre de lignes est supérieur à 0
+    // alors on affiche le message d'avertissement
+    // utilisateur
+	if ($row['nb_line'] > 0) {
+      $nbImages = sprintf($lang['dl_message_cart'], $row['nb_line']);
+    } else {
+      $nbImages = $lang['dl_empty_cart'];
+	}
+
+	return $nbImages;	
+  }
+
+  // Mise à jour du panier
+  function DmCart() {
+    if (isset($_POST['action'])) {
+      $this->DmControle();
+    }
+  }
+
+  // Affiche l'entrée HTML du formulaire
+  function DmFormThumbnail() {
+    global $template;
+    $template->concat('PLUGIN_INDEX_CONTENT_BEGIN', '<form id="dl" class="dl" action="'.duplicate_index_url().'" name="dl" method="post">');
+    
+  }
+
+  // Affiche les cases à cocher derrière le nom de l'image
+  function DmCategoryThumbnail($tpl_var) {
+    foreach($tpl_var as $cle=>$valeur) {
+      $tpl_var[$cle]['NAME'] = $tpl_var[$cle]['NAME'].'&nbsp;<input type="checkbox" id="id_images" name="id_images[]" value="'.$tpl_var[$cle]['ID'].'">';
+    }
+
+    return $tpl_var;
+  }
+
+  // Affichage du formulaire sous les vignettes
+  function DmCategoryDefault() {
+    global $user, $template, $lang;
+
+    // Intégration du formulaire sous les images
+    $template->set_filenames(
+      array('DownloadMulti_category' => $this->plugin_path.'template/DmCategory.tpl')
+    );
+
+	$list_dl = array('thumbnail' => $lang['dl_thumbnail'], 'normal' => $lang['dl_normal']);					
+
+    // Si l'utilisateur n'a pas le droit aux hautes définitions
+    // alors la ligne de téléchargement des hautes définitions
+    // ne s'affiche pas.
+    if($user['enabled_high'] == 1) {
+      $list_dl['high'] = $lang['dl_high'];
+    }
+
+	$template->assign('type', $list_dl);
+	$template->assign('select', $this->my_config['select_dl']);
+	
+    // Gestion du template
+    $dm_html = $template->parse('DownloadMulti_category', true);
+    $template->concat('PLUGIN_INDEX_CONTENT_END', $dm_html);
+  }
+
+  // Controle les valeurs envoyés par le formulaire
+  // Crée les répertoires zip_archive et celui de l'utilisateur
+  // si ils n'existent pas
+  function DmControle() {
+    global $template, $lang, $user, $errors;
+    $errors = array();
+
+    if(isset($_POST['id_images'])) {
+      $id_images = $_POST['id_images'];
+    }
+
+    if(isset($_POST['mode'])) {
+      $mode = $_POST['mode'];
+    }
+
+    // Test si au moins une image à été
+    // sélectionné
+    if(count($id_images) == 1) {
+      array_push($errors, $lang['dl_choice_image']);
+    }
+
+    // Test le répertoire zip_archive
+    // Si il n'existe pas le script le créé
+    // Action nécessaire pour résoudre le problème de droit chez certains hébergeurs
+    $dir = $this->plugin_path;
+    if(!is_dir($dir.'zip_archive/')) {
+      umask(0000);
+      if(!mkdir($dir.'zip_archive/', 0755)) {
+        array_push($errors, $lang['dl_dir_zip']);
+      }
+    }
+
+    // Création du répertoire de l'utilisateur avec sont id user
+    if(!is_dir($dir.'zip_archive/'.$user['id'])) {
+      umask(0000);
+      if(!mkdir($dir.'zip_archive/'.$user['id'], 0755)) {
+        array_push($errors, $lang['dl_dir_zip']);
+      }
+    }
+    clearstatcache();
+
+    // Si il n'y a aucunes erreurs
+    // on continue l'ajout dans la panier
+    if(count($errors) == 0) {
+      $this->DmAddPicture($id_images, $mode);
+      $this->DmCountCart();
+    }
+  }
+
+  /* Ajoute les images dans le panier
+  *  $id_images --> Liste des images sélectionnés
+  *  $mode      --> Type d'images ajouter (thumbnail, normal, high) */
+  function DmAddPicture($id_images, $mode) {
+    global $user, $prefixeTable, $template, $lang, $errors;
+
+    switch($mode) {
+      case 'thumbnail':
+        // Insertion des vignettes dans la base de données
+        for($i=0;$i<count($id_images);$i++) {
+          if(!empty($id_images[$i])) {
+            // Sélection des informations sur l'image
+            $query = '
+              SELECT id, name, file, path, tn_ext
+              FROM '.IMAGES_TABLE.'
+              WHERE id = \''.$id_images[$i].'\'
+            ;';
+            $row = mysql_fetch_array(pwg_query($query));
+
+            $file = get_thumbnail_path($row);
+
+            // Contrôle si l'image est un fichier distant
+            // Si c'est le cas alors un message
+            // d'erreur est généré
+            if(url_is_remote($file)) {
+              if($row['name'] == '') {
+                array_push($errors, $row['file'].$lang['dl_no_download_http']);
+              } else {
+                array_push($errors, $row['name'].$lang['dl_no_download_http']);
+              }
+            } else {
+              // Poids de l'image
+              $fic_size = filesize($file);
+
+              $query = '
+                INSERT INTO '.$prefixeTable.'download_multi (id_image, id_user, filesize, type)
+                VALUES (\''.$id_images[$i].'\', \''.$user['id'].'\', \''.$fic_size.'\', \'t\')
+                ON DUPLICATE KEY UPDATE
+                  id_user = \''.$user['id'].'\'
+                  AND id_image = \''.$id_images[$i].'\'
+                  AND type = \'t\'
+                ;';
+              $result = pwg_query($query);
+            }
+          }
+        }
+
+        if(count($errors) != 0) {
+          $template->assign('errors', $errors);
+        }
+      break;
+
+      case 'normal':
+      	// Pas propre mais nécessaire pour get_image_path
+      	include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');
+
+        // Insertion des photos normal dans la base de données
+        for($i=0;$i<count($id_images);$i++) {
+          // Sélection des informations sur l'image
+          $query = '
+            SELECT id, file, path
+            FROM '.IMAGES_TABLE.'
+            WHERE id = \''.$id_images[$i].'\'
+          ;';
+          $row = mysql_fetch_array(pwg_query($query));
+
+          $file = get_image_path($row);
+
+          // Contrôle si l'image est un fichier distant
+          // Si c'est le cas alors un message
+          // d'erreur est généré
+          if (url_is_remote($file)) {
+            if($row['name'] == '') {
+              array_push($errors, $row['file'].$lang['dl_no_download_http']);
+            } else {
+              array_push($errors, $row['name'].$lang['dl_no_download_http']);
+            }
+          } else {
+            // Taille de l'image
+            $fic_size = filesize($file);
+
+            $query = '
+              INSERT INTO '.$prefixeTable.'download_multi (id_image, id_user, filesize, type)
+              VALUES (\''.$id_images[$i].'\', \''.$user['id'].'\', \''.$fic_size.'\', \'n\')
+              ON DUPLICATE KEY UPDATE
+                id_user = \''.$user['id'].'\'
+                AND id_image = \''.$id_images[$i].'\'
+                AND type = \'n\'
+            ;';
+            $result = pwg_query($query);
+          }
+        }
+
+        if(count($errors) != 0) {
+          $template->assign('errors', $errors);
+        }
+      break;
+
+      case 'high':
+      	// Pas propre mais nécessaire pour get_image_path
+      	include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');
+
+        // Insertion des hautes définitions dans la base de données
+        for($i=0;$i<count($id_images);$i++) {
+          // Sélection des informations sur l'image
+          $query = '
+            SELECT id, name, file, path, has_high
+            FROM '.IMAGES_TABLE.'
+            WHERE id = \''.$id_images[$i].'\'
+          ;';
+          $row = mysql_fetch_array(pwg_query($query));
+
+          $file = get_high_path($row);
+
+          // Si une image sélectionné ne possède pas
+          // de version haute définition alors
+          // on renseigne le tableau qui
+          // contient la liste des images
+          if($row['has_high'] == false) {
+          	if($row['name'] == '') {
+          	  array_push($errors, $row['file'].$lang['dl_no_download_high']);
+            } else {
+          	  array_push($errors, $row['name'].$lang['dl_no_download_high']);
+            }
+          } else if (url_is_remote($file)) {
+            // Contrôle si l'image est un fichier distant
+            // Si c'est le cas alors un message
+            // d'erreur est généré
+            if($row['name'] == '') {
+              array_push($errors, $row['file'].$lang['dl_no_download_http']);
+            } else {
+              array_push($errors, $row['name'].$lang['dl_no_download_http']);
+            }
+          } else {
+            // contrôle si le fichier existe, dans le cas contraire
+            // rien n'est inséré et le traitement continue sur les images suivantes.
+            if(file_exists($file)) {
+              // Taille de l'image
+              $fic_size = filesize($file);
+
+              $query = '
+                INSERT INTO '.$prefixeTable.'download_multi (id_image, id_user, filesize, type)
+                VALUES (\''.$id_images[$i].'\', \''.$user['id'].'\', \''.$fic_size.'\', \'h\')
+                ON DUPLICATE KEY UPDATE
+                  id_user = \''.$user['id'].'\'
+                  AND id_image = \''.$id_images[$i].'\'
+                AND type = \'h\'
+              ;';
+              $result = pwg_query($query);
+            }
+          }
+        }
+      break;
+    }
+  }
+
+  /* Préfix des fichiers zip générés
+  * Si l'utilisateur vient de la page thumbnail
+  * il lui est demander de saisir un nom pour
+  * la génération des fichiers zip */
+  function DmPanierPrefixZip() {
+    global $template;
+
+    $template->assign('prefix',
+      array(
+        'VALUE' => $this->my_config['prefix'],
+        'F_ACTION' => 'DmPanier.php?DmAction=genfic',
+      )
+    );
+  }
+
+  /* Si la page est rechargé par le bouton "Supprimer"
+  * du formulaire il ne faut pas recréer les fichiers */
+  function DmPanierGenZip($prefix) {
+    global $prefixeTable, $user, $template, $lang, $counter, $conf;
+
+    $errors = array();
+
+    if(preg_match('/[^a-z0-9\-_]/', $prefix)) {
+      array_push($errors, $lang['dl_no_prefix']);
+    } else {
+      if($this->my_config['create_category']) {
+        // Sélection des photos par rapport à l'id utilisateur
+        // Récupération de la structure des catégories
+        $query = '
+            SELECT '.$prefixeTable.'download_multi.id_image, '.$prefixeTable.'download_multi.filesize, '.$prefixeTable.'download_multi.type,
+            t_images.file, t_images.path, t_images.tn_ext, t_images.has_high, t_images.id, t_images.name,
+            t_category.category_id
+            FROM '.$prefixeTable.'download_multi
+            INNER JOIN '.IMAGES_TABLE.' t_images
+              ON t_images.id = '.$prefixeTable.'download_multi.id_image
+            INNER JOIN '.IMAGE_CATEGORY_TABLE.' t_category
+            	ON t_images.id = t_category.image_id
+            WHERE id_user = '.$user['id'].'
+        ;';
+
+      } else {
+        $query = '
+            SELECT '.$prefixeTable.'download_multi.id_image, '.$prefixeTable.'download_multi.filesize, '.$prefixeTable.'download_multi.type,
+            '.IMAGES_TABLE.'.file, '.IMAGES_TABLE.'.path, '.IMAGES_TABLE.'.tn_ext, '.IMAGES_TABLE.'.has_high, '.IMAGES_TABLE.'.id
+            FROM '.$prefixeTable.'download_multi
+            INNER JOIN '.IMAGES_TABLE.'
+            ON '.IMAGES_TABLE.'.id = '.$prefixeTable.'download_multi.id_image
+            WHERE id_user = '.$user['id'].'
+        ;';
+      }
+      
+      $result = pwg_query($query);
+      $nbresult = mysql_num_rows($result);
+
+      // Si le nombre d'enregistrement est inférieur à
+      // alors il n'y a pas de fichier proposé au téléchargement
+      if ($nbresult == 0) {
+        array_push($errors, $lang['dl_no_file']);
+      } else {
+      	// Découpage pour la création
+        // de la barre de progression
+        $indice = floor(100 / $nbresult);
+        $indices = 0;
+
+      	$template->set_filenames(
+          array('DownloadMulti_waiting' => $this->plugin_path.'/template/DmWaiting.tpl')
+        );
+
+        $template->assign('waiting', $indices);
+        
+        $i = 0;              
+        $fichiers = array();
+        $counter = 0;
+        
+        while ($row = mysql_fetch_array($result)) {
+          $cat_info = '';
+          $cat_name = '';          
+          $c = 0;
+
+          if ($row['type'] == 't') {
+            $fichiers[$i]['path'] = get_thumbnail_path($row);
+            $fichiers[$i]['poids'] = $row['filesize'];
+            
+            // Récupération du fichier originel ou alors du nom
+            // de fichier créé par pLoader
+            // ToDo : A MODIFIER LORSQUE LE NOM DU VRAI FICHIER SERA STOCKE PAR Piwigo   
+            if (empty($row['name'])) {
+              $fichiers[$i]['name'] = $conf['prefix_thumbnail'].$row['file'];
+            } else {
+              $fichiers[$i]['name'] = $conf['prefix_thumbnail'].$row['name'];
+            }
+           
+            if($this->my_config['create_category']) {
+              // Recréation de la structure des catégories      
+              $cat_info = get_cat_info($row['category_id']);
+              if (!empty($cat_info['uppercats'])) {
+		        $nb_cat = count(explode(',', $cat_info['uppercats']));
+		        while ($c < $nb_cat) {
+          	      $cat_name = $cat_name.$cat_info['upper_names'][$c]['name'].'/';          	  
+          	      $c++;          	
+                }
+                $fichiers[$i]['cat_name'] = $cat_name.'thumbnails/';
+              }                          
+            } else {
+              $fichiers[$i]['cat_name'] = $fichiers[$i]['path'];
+            }
+            $i++;
+          }
+
+          if ($row['type'] == 'n') {
+          	include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');
+          	$fichiers[$i]['path'] = get_image_path($row);
+            $fichiers[$i]['poids'] = $row['filesize'];
+            
+            // Récupération du fichier original ou alors du nom
+            // de fichier créé par pLoader 
+            // ToDo : A MODIFIER LORSQUE LE NOM DU VRAI FICHIER SERA STOCKE PAR Piwigo           
+            if (empty($row['name'])) {
+              $fichiers[$i]['name'] = $row['file'];
+            } else {
+              $fichiers[$i]['name'] = $row['name'];
+            }
+            
+            if($this->my_config['create_category']) {
+              // Recréation de la structure des catégories  
+              $cat_info = get_cat_info($row['category_id']);
+              if (!empty($cat_info['uppercats'])) {
+		        $nb_cat = count(explode(',', $cat_info['uppercats']));
+		        while ($c < $nb_cat) {
+          	      $cat_name = $cat_name.$cat_info['upper_names'][$c]['name'].'/';          	  
+          	      $c++;          	
+                }
+                $fichiers[$i]['cat_name'] = $cat_name;
+              }
+            } else {
+              $fichiers[$i]['cat_name'] = $fichiers[$i]['path'];
+            }              
+            $i++;
+          }
+
+          if ($row['type'] == 'h') {
+          	include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');
+          	$fichiers[$i]['path'] = get_high_path($row);
+            $fichiers[$i]['poids'] = $row['filesize'];
+            
+            // Récupération du fichier originel ou alors du nom
+            // de fichier créé par pLoader  
+            // ToDo : A MODIFIER LORSQUE LE NOM DU VRAI FICHIER SERA STOCKE PAR Piwigo             
+            if (empty($row['name'])) {
+              $fichiers[$i]['name'] = $row['file'];
+            } else {
+              $fichiers[$i]['name'] = $row['name'];
+            }
+
+            if($this->my_config['create_category']) {
+              // Recréation de la structure des catégories
+              $cat_info = get_cat_info($row['category_id']);
+              if (!empty($cat_info['uppercats'])) {
+		        $nb_cat = count(explode(',', $cat_info['uppercats']));
+		        while ($c < $nb_cat) {
+          	      $cat_name = $cat_name.$cat_info['upper_names'][$c]['name'].'/';          	  
+          	      $c++;          	
+                }
+                $fichiers[$i]['cat_name'] = $cat_name.'pwg_high/';
+              }
+            } else {
+              $fichiers[$i]['cat_name'] = $fichiers[$i]['path'];
+            }              
+            $i++;
+          }
+        }
+
+        $fic_size = 0;
+
+        if(class_exists('zipArchive')) {         
+          // Création de la 1ere archive
+          $this->DmCreateZip($prefix);
+
+          foreach($fichiers as $cle => $file) {
+          	$indices = $indice + $indices;
+
+            // Contrôle la taille de l'archive
+            // si elle est inférieur à la configuration
+            // la boucle continue d'ajouter des fichiers
+            if ($file['poids'] >= $this->my_config['archive_size']) {
+              $this->DmAddZip($file['path'], $file['cat_name'].$file['name']);
+              $this->DmCloseZip();
+
+              $counter = $counter + 1;
+              $this->DmCreateZip($prefix);
+              $fic_size = 0;
+            } else if($fic_size <= $this->my_config['archive_size']) {
+              $this->DmAddZip($file['path'], $file['cat_name'].$file['name']);
+            } else {
+              // si la taille est supérieur à la configuration
+              // alors l'archive précédente est fermé
+              // et une nouvelle est créé
+              $this->DmCloseZip();
+              
+              $this->DmCreateZip($prefix);
+              $this->DmAddZip($file['path'], $file['cat_name'].$file['name']);
+              $fic_size = 0;
+            }
+
+            $fic_size = $file['poids'] + $fic_size;
+
+            // Force l'affichage de la barre de progression
+            if(function_exists('ob_flush')) {
+              $template->assign('waiting', $indices);
+              $dm_html = $template->pparse('DownloadMulti_waiting');
+              $template->concat('PLUGIN_INDEX_PANIER_BEFORE', $dm_html);
+              echo '&nbsp;';
+              @ob_flush();
+              flush();
+              @ob_flush();
+              flush();              
+            }
+          }
+
+          $this->DmCloseZip();
+        } 
+          // ANNULE : http://fr.piwigo.org/forum/viewtopic.php?pid=118210#p118210
+          /*else {
+          require_once $this->plugin_path.'include/pclzip.lib.php';
+
+          $fic_size = 0;
+          $create_zip_archive = 1;
+          $i = 0;
+          foreach($fichiers as $cle => $file) {
+          	$indices = $indice + $indices;
+            if ($file['poids'] >= $this->my_config['archive_size']) {
+              $this->DmPclZipCreateZip($prefix, $file['path']);
+            } else if ($fic_size <= $this->my_config['archive_size']) {
+              $this->DmPclZipAddZip($prefix, $file['path'], $create_zip_archive);
+              $fic_size = $file['poids'] + $fic_size;
+            } /*else {
+              $create_zip_archive = 1;
+              $this->DmPclZipAddZip($prefix, $file['path'], $create_zip_archive);
+              $fic_size = 0;	
+            }                           
+
+            // Force l'affichage de la barre de progression
+            if(function_exists('ob_flush')) {
+              $template->assign('waiting', $indices);
+              $dm_html = $template->pparse('DownloadMulti_waiting');
+              $template->concat('PLUGIN_INDEX_PANIER_BEFORE', $dm_html);
+              echo '&nbsp;';
+              @ob_flush();
+              flush();
+              @ob_flush();
+              flush();
+            }
+          }
+        }*/
+      }
+    }
+    // Liste le répertoire de l'utlilisateur
+    $this->DmPanierListeDir();
+
+    if(count($errors) != 0) {
+      $template->assign('errors', $errors);
+      $this->DmPanierPrefixZip();
+    }
+  }
+
+  // Créé l'archive avec son nom
+  // avec la lib PclZip
+  // ANNULE : http://fr.piwigo.org/forum/viewtopic.php?pid=118210#p118210
+  /*function DmPclZipCreateZip($prefix, $path) {
+    global $template, $lang, $errors;
+
+    $fichier_zip = $this->DmCreateNameZip($prefix);
+    $archive = new PclZip($fichier_zip);
+
+    if ($this->my_config['active_comment']) {
+      $action = $archive->create($path,
+        PCLZIP_OPT_REMOVE_PATH, PHPWG_ROOT_PATH.'upload',
+        PCLZIP_OPT_ADD_PATH, $this->my_config['prefix_dir'],
+        PCLZIP_OPT_COMMENT, $this->my_config['comment'],
+        PCLZIP_OPT_NO_COMPRESSION
+      );
+    } else {
+      $action = $archive->create($path,
+        PCLZIP_OPT_REMOVE_PATH, PHPWG_ROOT_PATH.'upload',
+        PCLZIP_OPT_ADD_PATH, $this->my_config['prefix_dir'],
+        PCLZIP_OPT_NO_COMPRESSION
+      );
+    }
+
+    if ($action == 0) {
+      array_push($errors, $lang['dl_no_file']);
+      $template->assign('errors', $errors);
+    }    
+  }*/
+
+  // ANNULE : http://fr.piwigo.org/forum/viewtopic.php?pid=118210#p118210
+  // Ajout des fichiers dans l'archive
+  // avec la lib PclZip
+  /*function DmPclZipAddZip($prefix, $path, $create_zip_archive) {
+    global $errors, $template, $lang, $create_zip_archive, $user;
+    
+    if ($create_zip_archive == 1) {
+      $fichier_zip = $this->DmCreateNameZip($prefix);    
+      $create_zip_archive = 0;
+    } else {
+      $fichier_zip = get_class_vars(get_class($action));
+      $fichier_zip = $fichier_zip['zipname'];
+    }
+    
+    $archive = new PclZip($fichier_zip);
+    
+    if ($this->my_config['active_comment']) {
+      $action = $archive->add($path,
+        PCLZIP_OPT_REMOVE_PATH, PHPWG_ROOT_PATH.'upload',
+        PCLZIP_OPT_ADD_PATH, $this->my_config['prefix_dir'],
+        PCLZIP_OPT_COMMENT, $this->my_config['comment'],
+        PCLZIP_OPT_NO_COMPRESSION
+      );
+    } else {
+      $action = $archive->add($path,
+        PCLZIP_OPT_REMOVE_PATH, PHPWG_ROOT_PATH.'upload',
+        PCLZIP_OPT_ADD_PATH, $this->my_config['prefix_dir'],
+        PCLZIP_OPT_NO_COMPRESSION
+      );	 
+      var_dump($action);
+    }    
+
+    if ($action == 0) {
+      array_push($errors, $lang['dl_no_file'].'<br />'.$archive->errorInfo(true));
+      $template->assign('errors', $errors);
+    }
+  }*/
+
+  // Génération du nom de fichier zip
+  function DmCreateNameZip($prefix) {
+    global $user, $counter;
+    $dir_zip = $this->plugin_path.'zip_archive/'.$user['id'].'/';
+	
+	// nom du fichier zip
+	$nom_fichier = str_replace('[date]', date('Ymd'), $this->my_config['pattern_name']);
+	$nom_fichier = str_replace('[rand]', rand(1, 2000), $nom_fichier);
+	$nom_fichier = $prefix.$nom_fichier.'_'.$counter;
+	
+    $fichier_zip = $dir_zip.$nom_fichier.'.zip'; // chemin d'accès au fichier zip
+    
+    return $fichier_zip;
+  }
+
+  // Création de l'instance zip
+  // et création de l'archive avec la class zipArchive
+  function DmCreateZip($prefix) {
+    global $zip;
+
+    $fichier_zip = $this->DmCreateNameZip($prefix);
+    $zip = new ZipArchive();
+    $zip->open($fichier_zip, ZIPARCHIVE::CREATE);
+  }
+
+  // Ajout des fichiers dans l'archive
+  // avec la class zipArchive
+  function DmAddZip($path, $file_name) {  	
+    global $zip;
+
+    if(!$this->my_config['create_category']) {
+      $file_name = str_replace(PHPWG_ROOT_PATH.'./galleries/', '', $file_name);
+      $file_name = str_replace(PHPWG_ROOT_PATH.'./upload/', '', $file_name);
+    }
+        
+    $zip->addFile($path, $this->my_config['prefix_dir'].'/'.$file_name);
+
+    if($this->my_config['active_comment']) {
+      $zip->setArchiveComment($this->my_config['comment']);
+    }
+  }
+
+  // Fermeture de l'archive
+  // avec la class zipArchive
+  function DmCloseZip() {
+    global $zip;
+    $zip->close();
+  }
+
+  /* Liste le répertoire utilisateur */
+  function DmPanierListeDir() {
+    global $user, $template, $lang, $errors;
+    $dir_zip = $this->plugin_path.'zip_archive/'.$user['id'].'/';
+
+    $errors = array();
+
+    $dir = opendir($dir_zip);
+    while($file = readdir($dir)) {
+      if(!is_file($file) && $file != '.' && $file != '..')  {
+        $tab_file[] = array('file' => $file, 'date' => filemtime($dir_zip.$file));
+      }
+    }
+
+    closedir($dir);
+    clearstatcache();
+
+    if (isset($tab_file)) {
+      $template->assign(
+        array(
+          'F_ACTION' => 'DmPanier.php?DmAction=del'
+        )
+      );
+
+      // Obtient une liste de colonnes
+      foreach ($tab_file as $key => $row) {
+        $file[$key]  = $row['file'];
+        $date[$key] = $row['date'];
+      }
+
+      // Tri les données par volume décroissant, edition croissant
+      // Ajoute $data en tant que dernier paramêtre, pour trier par la clé commune
+      array_multisort($file, SORT_ASC, $date, SORT_DESC, $tab_file);
+
+      foreach($tab_file as $elem) {
+        $tpl_var =
+          array(
+            'FIC_CHEMIN' => $this->plugin_url.'plugins/'.$this->plugin_name.'/zip_archive/'.$user['id'].'/',
+            'FIC_NAME' => $elem['file'],
+            'FIC_DATE' => $this->DmPanierDd($elem['date'])
+        );
+
+        $template->append('telechargements', $tpl_var);
+      }
+    } else {
+      array_push($errors, $lang['dl_no_file']);
+      $template->assign('errors', $errors);
+    }
+  }
+
+  // Vide le panier en cours
+  function DmPanierDelete() {
+    global $user, $prefixeTable;
+    // Suppression des images sélectionné dans une précédente session
+    $query = '
+      DELETE FROM '.$prefixeTable.'download_multi
+      WHERE id_user = \''.$user['id'].'\'
+    ;';
+    $result = pwg_query($query);
+
+    // Optimisation de la table pour éviter la fragmentation
+    // après suppression d'enregistrements
+    $query = '
+      OPTIMIZE TABLE '.$prefixeTable.'download_multi
+    ;';
+    $result = pwg_query($query);
+
+    redirect(duplicate_index_url());
+  }
+
+  /* Suppression des fichiers dans le
+  *  répertoire utilisateur
+  *  $fic --> liste des fichiers  */
+  function DmPanierDelUserDir($fic) {
+    global $user, $prefixeTable;
+    if (isset($fic)) {
+      $dir_zip = $this->plugin_path.'zip_archive/'.$user['id'].'/';
+      foreach($fic as $file) {
+        unlink($dir_zip.$file);
+      }
+      clearstatcache();
+    }
+  }
+
+  /* Renvoie la date */
+  function DmPanierDd($date) {
+    return date("d/m/Y H:i:s", $date);
+  }
+/* ------- Fin de la page DmPanier.php ------ */
+
+/* ------- Section pour le fichier DmPreview.php ------ */
+  /* Affiche la liste des images */
+  function DmPreviewList() {
+    global $prefixeTable, $user, $template, $lang, $errors;
+
+    $errors = array();
+
+    $query = '
+      SELECT *
+      FROM '.$prefixeTable.'download_multi
+      INNER JOIN '.IMAGES_TABLE.'
+      ON '.IMAGES_TABLE.'.id = '.$prefixeTable.'download_multi.id_image
+      WHERE id_user = '.$user['id'].'
+      ORDER BY file
+    ;';
+    $result = pwg_query($query);
+
+    // Si il n'y a pas d'enregistrement
+    // Affiche le message 'panier vide'
+    if (mysql_num_rows($result) == 0) {
+      array_push($errors, $lang['dl_empty_cart']);
+      $template->assign('errors', $errors);
+    } else {
+      while ($row = mysql_fetch_array($result)) {
+
+        $type = $row['type'];
+        switch ($type) {
+          case 't':
+            $txt_type = $lang['dl_type_thumbnail'];
+            $img_type = 'page_white_world.png';
+          break;
+          case 'n':
+            $txt_type = $lang['dl_type_normal'];
+            $img_type = 'page_white_picture.png';
+          break;
+          case 'h':
+            $txt_type = $lang['dl_type_high'];
+            $img_type = 'page_white_camera.png';
+          break;
+        }
+
+        $url = duplicate_picture_url(
+          array(
+            'image_id' => $row['id'],
+            'image_file' => $row['file']
+          ),
+          array('start')
+        );
+
+        $thumbnail_url = get_thumbnail_url($row);
+
+        $tpl_var =
+          array(
+            'F_ID_IMAGE' => $row['id_image'],
+            'F_TYPE' => $type,
+            'NAME' => get_thumbnail_title($row),
+            'TYPE' => $txt_type,
+            'IMG' => $img_type,
+            'URL' => $url,
+            'TN_SRC' => $thumbnail_url
+          );
+        $template->append('thumbnails', $tpl_var);
+      }
+    }
+  }
+
+  /* Supprime une image
+  * id_image -> identifiant de l'image
+  * type -> type de l'image */
+  function DmPreviewDel($id_image, $type) {
+    global $prefixeTable;
+    // Suppression d'une image par rapport à sont id
+    $query = '
+      DELETE FROM '.$prefixeTable.'download_multi
+      WHERE id_image = \''.$id_image.'\'
+      AND type = \''.$type.'\'
+    ;';
+    $result = pwg_query($query);
+
+    // Optimisation de la table pour éviter la fragmentation
+    // après suppression d'enregistrements
+    $query = '
+      OPTIMIZE TABLE '.$prefixeTable.'download_multi
+    ;';
+
+    $result = pwg_query($query);
+  }
+/* ------- Fin de la page DmPreview.php ------ */
+
+/* ------- Administration ------- */
+  function DmServeurConfiguration() {
+    global $template;
+
+    if(class_exists('zipArchive')) {
+      $template->assign(
+          'DmServeurConfiguration',
+            array(
+              'ZIP' => 'zipArchive',
+              'PHP_VERSION' => PHP_VERSION,
+            )
+          );
+    } else {
+      $template->assign(
+          'DmServeurConfiguration',
+            array(
+              'ZIP' => 'PclZip',
+              'PHP_VERSION' => PHP_VERSION,
+            )
+          );
+    }
+  }
+}
+?>
Index: /extensions/Download_Multi/include/index.php
===================================================================
--- /extensions/Download_Multi/include/index.php	(revision 3986)
+++ /extensions/Download_Multi/include/index.php	(revision 3986)
@@ -0,0 +1,35 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch        : BSF (Best So Far)
+// | file          : $RCSfile$
+// | last update   : $Date: 2006-07-18 23:38:54 +0200 (mar., 18 juil. 2006) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1481 $
+// +-----------------------------------------------------------------------+
+// | 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 of index.php
+
+$url = '../index.php';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Download_Multi/index.php
===================================================================
--- /extensions/Download_Multi/index.php	(revision 3986)
+++ /extensions/Download_Multi/index.php	(revision 3986)
@@ -0,0 +1,34 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch        : BSF (Best So Far)
+// | file          : $RCSfile$
+// | last update   : $Date: 2006-07-18 23:38:54 +0200 (mar., 18 juil. 2006) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1481 $
+// +-----------------------------------------------------------------------+
+// | 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 of index.php
+$url = '../index.php';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Download_Multi/initialize.inc.php
===================================================================
--- /extensions/Download_Multi/initialize.inc.php	(revision 3986)
+++ /extensions/Download_Multi/initialize.inc.php	(revision 3986)
@@ -0,0 +1,44 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Mod Name : Download_multi                                             |
+// | Mod Version : 0.9-1                                                   |
+// | Mod Orignal author: Tboris                                            |
+// | Mod Second author : Cestlodovic                                       |
+// | Mod Version author : FlipFlip <flipflip@free.fr>                      |
+// | Mod description :                                                     |
+// | Ce module est base sur le module existant pour le telechargement,     |
+// | cette version permet le telechargement sur plusieurs pages.           |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+if (!defined('PHPWG_ROOT_PATH')) {
+  die('Hacking attempt!');
+}
+
+add_event_handler('init', 'download_multi_init');
+
+function download_multi_init() {
+  $plugin_name = basename(dirname(__FILE__));
+  $plugin_path = dirname(__FILE__).'/';
+  $plugin_url = get_root_url();
+
+  include_once($plugin_path.'include/class.inc.php');
+
+  // Create object
+  $download_multi = new DownloadMulti($plugin_name, $plugin_path, $plugin_url);
+  set_plugin_data($download_multi->plugin_name, $download_multi);
+}
+?>
Index: /extensions/Download_Multi/language/en_UK/help/download_multi.html
===================================================================
--- /extensions/Download_Multi/language/en_UK/help/download_multi.html	(revision 3986)
+++ /extensions/Download_Multi/language/en_UK/help/download_multi.html	(revision 3986)
@@ -0,0 +1,28 @@
+<h2>Download Multi</h2>
+
+<p>Télécharger les images sur plusieurs pages</p>
+
+<p>Pour pouvoir fonctionner correctement javascript doit être activé sur 
+votre navigateur.</p>
+
+<h3>Utilisation</h3>
+
+<p>Pour télécharger les images de votre choix il faut les séléctionner en cochant
+la case sous la vignette, ou bien cliquer sur le bouton <span class="pwgScreen">Tout cocher</span>.
+Ensuite il faut cliquer sur le bouton <span class="pwgScreen">Ajouter au panier</span>. Un message
+apparait en bas de la page :
+<blockquote>Vous avez actuelement 10 image(s) dans votre panier.
+Merci de vider le panier avant de commencer une nouvelle sélection.</blockquote></p>
+
+<p>Pour voir le contenu de votre panier, cliquer sur le bouton <span class="pwgScreen">Voir le panier</span>.
+Depuis cet écran vous pouvez connaitre le type d'images dans votre panier et en supprimer (une à une) en
+cliquant sur la croix rouge.</p>
+
+<p>Pour télécharger votre panier, cliquer sur le bouton <span class="pwgScreen">Télécharger le panier</span>.
+Il vous est demandez de préciser un préfixe pour les fichiers zip, vous pouvez laissé celui par défaut. 
+Pour passer à l'étape suivante cliquer sur le bouton <span class="pwgScreen">Envoyer</span>. Une liste de fichier
+apparait. Pour récupérer les fichiers archives il suffit de cliquer sur le nom des fichiers, votre navigateur 
+vous proposera une action. Depuis cet écran vous pouvez supprimer les archives zip. Soit vous sélectionner toute
+les archives en cliquant sur le bouton <span class="pwgSreen">Sélectioner</span>, ou alors fichier par fichier en 
+cochant la case à côté du nom du fichier. Ensuite cliquer sur le bouton <span class="pwgScreen">Supprimer</span> pour
+supprimer les fichiers sélectionner.</p>
Index: /extensions/Download_Multi/language/en_UK/help/index.php
===================================================================
--- /extensions/Download_Multi/language/en_UK/help/index.php	(revision 3986)
+++ /extensions/Download_Multi/language/en_UK/help/index.php	(revision 3986)
@@ -0,0 +1,35 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch        : BSF (Best So Far)
+// | file          : $RCSfile$
+// | last update   : $Date: 2006-03-15 23:44:35 +0100 (mer., 15 mars 2006) $
+// | last modifier : $Author: plg $
+// | revision      : $Revision: 1082 $
+// +-----------------------------------------------------------------------+
+// | 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 of index.php
+
+$url = '../index.php';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Download_Multi/language/en_UK/index.php
===================================================================
--- /extensions/Download_Multi/language/en_UK/index.php	(revision 3986)
+++ /extensions/Download_Multi/language/en_UK/index.php	(revision 3986)
@@ -0,0 +1,35 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch        : BSF (Best So Far)
+// | file          : $RCSfile$
+// | last update   : $Date: 2006-03-15 23:44:35 +0100 (mer., 15 mars 2006) $
+// | last modifier : $Author: plg $
+// | revision      : $Revision: 1082 $
+// +-----------------------------------------------------------------------+
+// | 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 of index.php
+
+$url = '../index.php';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Download_Multi/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/Download_Multi/language/en_UK/plugin.lang.php	(revision 3986)
+++ /extensions/Download_Multi/language/en_UK/plugin.lang.php	(revision 3986)
@@ -0,0 +1,94 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Mod Name : Download_multi                                             |
+// | Mod Version : 0.9-1                                                   |
+// | Mod Orignal author: Tboris                                            |
+// | Mod Second author : Cestlodovic                                       |
+// | Mod Version author : FlipFlip <flipflip@free.fr>                      |
+// | Mod description :                                                     |
+// | Ce module est base sur le module existant pour le telechargement,     |
+// | cette version permet le telechargement sur plusieurs pages.           |
+// +-----------------------------------------------------------------------+
+// | 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['dl_select_all'] = 'Select all';
+$lang['dl_start'] = 'Download your cart';
+$lang['dl_preview'] = 'View your cart';
+$lang['dl_uncheck'] = 'Unselect all';
+$lang['dl_select'] = 'Add in cart';
+$lang['dl_title'] = 'Download the images';
+$lang['dl_thumbnail'] = 'Download the thumbnails';
+$lang['dl_normal'] = 'Download the normal pictures';
+$lang['dl_high'] = 'Download the high resolution pictures';
+$lang['dl_legend_select'] = 'Select the pictures';
+$lang['dl_message_cart'] = 'You have %s pictures';
+$lang['dl_trash'] = 'Empty the cart';
+$lang['dl_archive'] = 'View archives';
+$lang['dl_choice_image'] = 'You must choose at least one picture.';
+$lang['dl_dir_zip'] = 'Impossible to create directory';
+$lang['dl_title_erreur'] = 'Error';
+$lang['dl_title_telechargement'] = 'Files list';
+$lang['dl_empty_cart'] = 'Empty cart';
+$lang['dl_bt_select'] = 'Select';
+$lang['dl_bt_unselect'] = 'Unselect';
+$lang['dl_bt_delete'] = 'Delete';
+$lang['dl_th_file'] = 'Files';
+$lang['dl_th_date'] = 'Create Date';
+$lang['dl_th_action'] = 'Action';
+$lang['dl_no_file'] = 'No files';
+$lang['dl_prefix_file'] = 'File Prefix';
+$lang['dl_prefix_button'] = 'Send';
+$lang['dl_type_thumbnail'] = 'Thumbnail';
+$lang['dl_type_normal'] = 'Normal';
+$lang['dl_type_high'] = 'High definition';
+$lang['dl_cart'] = 'Cart';
+$lang['dl_no_download_title'] = 'Les images suivantes ne peuvent pas être téléchargées en haute définition';
+$lang['dl_no_download_high'] = ' est indisponible en haut définition;';
+$lang['dl_no_download_http'] = ' est indisponible au téléchargement;';
+$lang['dl_no_file'] = 'Aucuns fichiers à télécharger.';
+
+/* ----------- Administration ------------ */
+$lang['dl_title'] = 'Download Multi';
+$lang['dl_title_config'] = 'Download Multi configuration';
+$lang['dl_zip_active_comment'] = 'Activer les commentaires dans le fichier zip. <br /><i>Ne fonctionne pas chez free.fr.</i>';
+$lang['dl_zip_comment'] = 'Commentaire qui sera affiché dans le fichier zip';
+$lang['dl_group_id'] = 'Groupe autorisé à télécharger les images. Utiliser la touche <i>ctrl</i> pour en sélectionner plusieurs.';
+$lang['dl_max_size'] = 'Taille maximal des archives en octets';
+$lang['dl_zip_prefix'] = 'Préfixe par défaut pour le nom des fichiers zip télécharger';
+$lang['dl_zip_prefix_car'] = 'Le champ <i>Préfixe par défaut des nom de fichiers zip télécharger</i> ne peut contenir que des chiffres et des lettres sans accents.';
+$lang['dl_zip_dir_prefix'] = 'Préfixe du répertoire utiliser lors de la décompression';
+$lang['dl_zip_dir_prefix_car'] = 'Le champ <i>Préfixe du répertoire utiliser lors de la décompression</i> ne peut contenir que des chiffres et des lettres sans accents.';
+$lang['dl_backup_config'] = 'Configuration de Download Multi sauvegardée';
+$lang['dl_converter'] = 'Converter';
+$lang['dl_zip_pattern_name'] = 'Génération du nom de vos archives, utilisez [date] pour insérer la date sous la forme : YYYYMMDD et [rand] pour générer un chiffre aléatoire';
+$lang['dl_select_dl'] = 'Type de téléchargement par défaut';
+
+$lang['dl_error_group_id'] = 'Vous devez indiquer le groupe authorisé à télécharger les images';
+$lang['dl_error_file_size'] = 'Vous devez indiquer la taille des archives';
+$lang['dl_error_file_size_car'] = 'Le champ <i>Taille maximal des archives en octets</i> ne peut contenir que des chiffres.';
+$lang['dl_zip_pattern_name_car'] = 'Le champ <i>Génération du nom de vos archives</i> ne peut contenir que des chiffres et des lettres sans accents.';
+$lang['dl_error_pattern_name'] = 'Le champ <i>Génération du nom de vos archives</i> ne peut être vide.';
+$lang['dl_create_category'] = 'Re-créer la structure des catégories dans les archives générées';
+
+$lang['dl_title_information'] = 'Information sur votre configuration';
+$lang['dl_class_zip'] = 'Vous utilisez : ';
+
+/* ----------- Installation -------------- */
+$lang['dl_mysql_version'] = 'Version de mysql incompatible. Vous devez avoir au minimum la version 4.1';
+$lang['dl_php_version'] = 'Version de php inférieur à 5, installation impossible';
+$lang['dl_install_ok'] = 'Installation ok';
+$lang['dl_class_exist'] = 'Pour fonctionner correctement votre serveur doit utiliser la class php ZipArchive, contacter votre administrateur pour qu\'il l\'active';
+?>
Index: /extensions/Download_Multi/language/fr_FR/help/download_multi.html
===================================================================
--- /extensions/Download_Multi/language/fr_FR/help/download_multi.html	(revision 3986)
+++ /extensions/Download_Multi/language/fr_FR/help/download_multi.html	(revision 3986)
@@ -0,0 +1,28 @@
+<h2>Download Multi</h2>
+
+<p>Télécharger les images sur plusieurs pages</p>
+
+<p>Pour pouvoir fonctionner correctement javascript doit être activé sur 
+votre navigateur.</p>
+
+<h3>Utilisation</h3>
+
+<p>Pour télécharger les images de votre choix il faut les séléctionner en cochant
+la case sous la vignette, ou bien cliquer sur le bouton <span class="pwgScreen">Tout cocher</span>.
+Ensuite il faut cliquer sur le bouton <span class="pwgScreen">Ajouter au panier</span>. Un message
+apparait en bas de la page :
+<blockquote>Vous avez actuelement 10 image(s) dans votre panier.
+Merci de vider le panier avant de commencer une nouvelle sélection.</blockquote></p>
+
+<p>Pour voir le contenu de votre panier, cliquer sur le bouton <span class="pwgScreen">Voir le panier</span>.
+Depuis cet écran vous pouvez connaitre le type d'images dans votre panier et en supprimer (une à une) en
+cliquant sur la croix rouge.</p>
+
+<p>Pour télécharger votre panier, cliquer sur le bouton <span class="pwgScreen">Télécharger le panier</span>.
+Il vous est demandez de préciser un préfixe pour les fichiers zip, vous pouvez laissé celui par défaut. 
+Pour passer à l'étape suivante cliquer sur le bouton <span class="pwgScreen">Envoyer</span>. Une liste de fichier
+apparait. Pour récupérer les fichiers archives il suffit de cliquer sur le nom des fichiers, votre navigateur 
+vous proposera une action. Depuis cet écran vous pouvez supprimer les archives zip. Soit vous sélectionner toute
+les archives en cliquant sur le bouton <span class="pwgSreen">Sélectioner</span>, ou alors fichier par fichier en 
+cochant la case à côté du nom du fichier. Ensuite cliquer sur le bouton <span class="pwgScreen">Supprimer</span> pour
+supprimer les fichiers sélectionner.</p>
Index: /extensions/Download_Multi/language/fr_FR/help/index.php
===================================================================
--- /extensions/Download_Multi/language/fr_FR/help/index.php	(revision 3986)
+++ /extensions/Download_Multi/language/fr_FR/help/index.php	(revision 3986)
@@ -0,0 +1,35 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch        : BSF (Best So Far)
+// | file          : $RCSfile$
+// | last update   : $Date: 2006-03-15 23:44:35 +0100 (mer., 15 mars 2006) $
+// | last modifier : $Author: plg $
+// | revision      : $Revision: 1082 $
+// +-----------------------------------------------------------------------+
+// | 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 of index.php
+
+$url = '../index.php';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Download_Multi/language/fr_FR/index.php
===================================================================
--- /extensions/Download_Multi/language/fr_FR/index.php	(revision 3986)
+++ /extensions/Download_Multi/language/fr_FR/index.php	(revision 3986)
@@ -0,0 +1,35 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch        : BSF (Best So Far)
+// | file          : $RCSfile$
+// | last update   : $Date: 2006-03-15 23:44:35 +0100 (mer., 15 mars 2006) $
+// | last modifier : $Author: plg $
+// | revision      : $Revision: 1082 $
+// +-----------------------------------------------------------------------+
+// | 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 of index.php
+
+$url = '../index.php';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Download_Multi/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/Download_Multi/language/fr_FR/plugin.lang.php	(revision 3986)
+++ /extensions/Download_Multi/language/fr_FR/plugin.lang.php	(revision 3986)
@@ -0,0 +1,94 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Mod Name : Download_multi                                             |
+// | Mod Version : 0.9-1                                                   |
+// | Mod Orignal author: Tboris                                            |
+// | Mod Second author : Cestlodovic                                       |
+// | Mod Version author : FlipFlip <flipflip@free.fr>                      |
+// | Mod description :                                                     |
+// | Ce module est base sur le module existant pour le telechargement,     |
+// | cette version permet le telechargement sur plusieurs pages.           |
+// +-----------------------------------------------------------------------+
+// | 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['dl_select_all'] = 'Tout cocher';
+$lang['dl_start'] = 'Télécharger le panier';
+$lang['dl_preview'] = 'Voir le panier';
+$lang['dl_uncheck'] = 'Tout décocher';
+$lang['dl_select'] = 'Ajouter au panier';
+$lang['dl_title'] = 'Télécharger les images';
+$lang['dl_thumbnail'] = 'Télécharger les vignettes';
+$lang['dl_normal'] = 'Télécharger les visualisations écran';
+$lang['dl_high'] = 'Télécharger les hautes définitions';
+$lang['dl_legend_select'] = 'Sélectionner les images';
+$lang['dl_message_cart'] = 'Vous avez %s images';
+$lang['dl_trash'] = 'Vider le panier';
+$lang['dl_archive'] = 'Voir les archives';
+$lang['dl_choice_image'] = 'Vous devez choisir au moins une image.';
+$lang['dl_dir_zip'] = 'Création du répertoire impossible';
+$lang['dl_title_erreur'] = 'Erreur';
+$lang['dl_title_telechargement'] = 'Liste des fichiers';
+$lang['dl_empty_cart'] = 'Panier vide';
+$lang['dl_bt_select'] = 'Sélectionner';
+$lang['dl_bt_unselect'] = 'Désélectionner';
+$lang['dl_bt_delete'] = 'Supprimer';
+$lang['dl_th_file'] = 'Fichiers';
+$lang['dl_th_date'] = 'Date de création';
+$lang['dl_th_action'] = 'Action';
+$lang['dl_no_file'] = 'Pas de fichiers';
+$lang['dl_prefix_file'] = 'Préfixe du fichier';
+$lang['dl_prefix_button'] = 'Envoyer';
+$lang['dl_type_thumbnail'] = 'Vignette';
+$lang['dl_type_normal'] = 'Normal';
+$lang['dl_type_high'] = 'Haute définition';
+$lang['dl_cart'] = 'Panier';
+$lang['dl_no_download_high'] = ' est indisponible en haut définition;';
+$lang['dl_no_download_http'] = ' est indisponible au téléchargement;';
+$lang['dl_no_prefix'] = 'Le prefix ne peut pas contenir de caractères spéciaux sauf le - ou le _';
+$lang['dl_no_file'] = 'Aucuns fichiers à télécharger.';
+
+/* ----------- Administration ------------ */
+$lang['dl_title'] = 'Download Multi';
+$lang['dl_title_config'] = 'Download Multi configuration';
+$lang['dl_zip_active_comment'] = 'Activer les commentaires dans le fichier zip, ne fonctionne pas chez free.fr';
+$lang['dl_zip_comment'] = 'Commentaire qui sera affiché dans le fichier zip';
+$lang['dl_group_id'] = 'Groupe autorisé à télécharger les images. Utiliser la touche <i>ctrl</i> pour en sélectionner plusieurs';
+$lang['dl_max_size'] = 'Taille maximal des archives en octets';
+$lang['dl_zip_prefix'] = 'Préfixe par défaut des nom de fichiers zip télécharger';
+$lang['dl_zip_prefix_car'] = 'Le champ <i>Préfixe par défaut des nom de fichiers zip télécharger</i> ne peut contenir que des chiffres et des lettres sans accents';
+$lang['dl_zip_dir_prefix'] = 'Préfixe du répertoire utiliser lors de la décompression';
+$lang['dl_zip_dir_prefix_car'] = 'Le champ <i>Préfixe du répertoire utiliser lors de la décompression</i> ne peut contenir que des chiffres et des lettres sans accents';
+$lang['dl_backup_config'] = 'Configuration de Download Multi sauvegardée';
+$lang['dl_converter'] = 'Convertisseur';
+$lang['dl_zip_pattern_name'] = 'Génération du nom de vos archives, utilisez [date] pour insérer la date sous la forme : YYYYMMDD et [rand] pour générer un chiffre aléatoire';
+$lang['dl_select_dl'] = 'Type de téléchargement par défaut';
+
+$lang['dl_error_group_id'] = 'Vous devez indiquer le groupe authorisé à télécharger les images.';
+$lang['dl_error_file_size'] = 'Vous devez indiquer la taille des archives.';
+$lang['dl_error_file_size_car'] = 'Le champ <i>Taille maximal des archives en octets</i> ne peut contenir que des chiffres.';
+$lang['dl_zip_pattern_name_car'] = 'Le champ <i>Génération du nom de vos archives</i> ne peut contenir que des chiffres et des lettres sans accents.';
+$lang['dl_error_pattern_name'] = 'Le champ <i>Génération du nom de vos archives</i> ne peut être vide.';
+$lang['dl_create_category'] = 'Re-créer la structure des catégories dans les archives générées';
+
+$lang['dl_title_information'] = 'Information sur votre configuration';
+$lang['dl_class_zip'] = 'Vous utilisez : ';
+
+/* ----------- Installation -------------- */
+$lang['dl_mysql_version'] = 'Version de mysql incompatible. Vous devez avoir au minimum la version 4.1';
+$lang['dl_php_version'] = 'Version de php inférieur à 5, installation impossible';
+$lang['dl_install_ok'] = 'Installation ok';
+$lang['dl_class_exist'] = 'Pour fonctionner correctement votre serveur doit utiliser la class php ZipArchive, contacter votre administrateur pour qu\'il l\'active';
+?>
Index: /extensions/Download_Multi/language/index.php
===================================================================
--- /extensions/Download_Multi/language/index.php	(revision 3986)
+++ /extensions/Download_Multi/language/index.php	(revision 3986)
@@ -0,0 +1,35 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch        : BSF (Best So Far)
+// | file          : $RCSfile$
+// | last update   : $Date: 2006-07-18 23:38:54 +0200 (mar., 18 juil. 2006) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1481 $
+// +-----------------------------------------------------------------------+
+// | 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 of index.php
+
+$url = '../index.php';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Download_Multi/main.inc.php
===================================================================
--- /extensions/Download_Multi/main.inc.php	(revision 3986)
+++ /extensions/Download_Multi/main.inc.php	(revision 3986)
@@ -0,0 +1,41 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Mod Name : Download_multi                                             |
+// | Mod Version : 0.9-1                                                   |
+// | Mod Orignal author: Tboris                                            |
+// | Mod Second author : Cestlodovic                                       |
+// | Mod Version author : FlipFlip <flipflip@free.fr>                      |
+// | Mod description :                                                     |
+// | Ce module est base sur le module existant pour le telechargement,     |
+// | cette version permet le telechargement sur plusieurs pages.           |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+/*
+Plugin Name: Download Multi
+Version: 0.9-1
+Description: Permet le téléchargement d'images sur plusieurs pages dans une archive zip.
+Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=31
+Author: FlipFlip
+Author URI: http://phpwebgallery.net/ext/extension_view.php?eid=31
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) {
+  die('Hacking attempt!');
+}
+
+include_once(dirname(__FILE__).'/initialize.inc.php');
+?>
Index: /extensions/Download_Multi/maintain.inc.php
===================================================================
--- /extensions/Download_Multi/maintain.inc.php	(revision 3986)
+++ /extensions/Download_Multi/maintain.inc.php	(revision 3986)
@@ -0,0 +1,88 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Mod Name : Download_multi                                             |
+// | Mod Version : 0.9-1                                                   |
+// | Mod Orignal author: Tboris                                            |
+// | Mod Second author : Cestlodovic                                       |
+// | Mod Version author : FlipFlip <flipflip@free.fr>                      |
+// | Mod description :                                                     |
+// | Ce module est base sur le module existant pour le telechargement,     |
+// | cette version permet le telechargement sur plusieurs pages.           |
+// +-----------------------------------------------------------------------+
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+
+if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
+defined('DM_DIR') || define('DM_DIR' , basename(dirname(__FILE__)));
+defined('DM_PATH') || define('DM_PATH' , PHPWG_PLUGINS_PATH . DM_DIR . '/');
+
+global $lang;
+
+load_language('plugin.lang', DM_PATH);
+
+function plugin_install($plugin_id, $plugin_version, &$errors) {
+  global $prefixeTable;
+
+  if(!class_exists('zipArchive')) {
+  	array_push($errors, l10n('dl_class_exist'));
+  }
+  
+  list($mysql_version) = mysql_fetch_row(pwg_query('SELECT VERSION();'));
+
+  if (version_compare($mysql_version, '4.1', '<')) {
+    array_push($errors, l10n('dl_mysql_version'));
+  } else if (version_compare(phpversion(), '5.0.0', '<')) {
+  	array_push($errors, l10n('dl_php_version'));
+  } else {
+    $query = '
+      CREATE TABLE IF NOT EXISTS `'.$prefixeTable.'download_multi` (
+        `id_image` mediumint(8) NOT NULL default \'0\',
+        `id_user` smallint(5) NOT NULL default \'0\',
+        `type` enum(\'t\',\'n\',\'h\') NOT NULL default \'t\',
+        `filesize` int(10) unsigned NOT NULL default \'0\',
+        UNIQUE KEY Index_1 (`id_image`,`id_user`,`type`)
+      ) ENGINE=MyISAM COMMENT=\'Gestion des telechargement sur plusieurs pages\';
+    ';
+    pwg_query($query);
+  }
+}
+
+function plugin_activate($plugin_id, $plugin_version, &$errors) {
+}
+
+function plugin_deactivate($plugin_id) {
+  global $prefixeTable;
+  
+  $query = '
+    DELETE FROM '.CONFIG_TABLE.'
+    WHERE param=\'downloadmulti_config\'';
+
+  pwg_query($query);
+}
+
+function plugin_uninstall($plugin_id) {
+  global $prefixeTable;
+
+  $query = '
+    DELETE FROM '.CONFIG_TABLE.'
+    WHERE param=\'downloadmulti_config\'';
+
+  pwg_query($query);
+
+  $query = 'DROP TABLE IF EXISTS `'.$prefixeTable.'download_multi`;';
+  pwg_query($query);
+}
+?>
Index: /extensions/Download_Multi/template/DmCategory.tpl
===================================================================
--- /extensions/Download_Multi/template/DmCategory.tpl	(revision 3986)
+++ /extensions/Download_Multi/template/DmCategory.tpl	(revision 3986)
@@ -0,0 +1,27 @@
+<div id="download"> 
+  <h2>{'dl_title'|@translate}</h2>
+  <fieldset>
+
+    <legend>{'dl_legend_select'|@translate}</legend>
+    
+    {if isset($errors)}
+    <div class="errors">
+      <ul>
+        {foreach from=$errors item=error}
+        <li>{$error}</li>
+        {/foreach}
+      </ul>
+    </div>
+    {/if}    
+
+    <input name="action" id="action" type="hidden" value="add" />
+    {html_radios id="mode" name="mode" options=$type selected=$select separator='<br />'}
+    
+    <span>
+      <input name="all" type="button" value="{'dl_select_all'|@translate}" OnClick="cocher('dl');" />
+      <input name="reset" type="reset" value="{'dl_uncheck'|@translate}" />
+      <input name="select" type="submit" value="{'dl_select'|@translate}" />
+    </span>
+  </fieldset>
+  </form>
+</div>
Index: /extensions/Download_Multi/template/DmMenu.tpl
===================================================================
--- /extensions/Download_Multi/template/DmMenu.tpl	(revision 3986)
+++ /extensions/Download_Multi/template/DmMenu.tpl	(revision 3986)
@@ -0,0 +1,26 @@
+  <dt>{'dl_cart'|@translate}</dt>
+  <dd>
+    <p><img src="{$ROOT_URL}plugins/download_multi/template/images/cart_error.png">&nbsp;{$NBIMAGES}</p>
+    <ul>
+      <li>
+        <a href="{$ROOT_URL}plugins/download_multi/include/DmPreview.php" rel="nofollow" />
+          <img src="{$ROOT_URL}plugins/download_multi/template/images/cart.png">&nbsp;{'dl_preview'|@translate}
+        </a>
+      </li>
+	  <li>
+        <a href="{$ROOT_URL}plugins/download_multi/include/DmPanier.php?DmAction=name" rel="nofollow" />
+          <img src="{$ROOT_URL}plugins/download_multi/template/images/cart_go.png">&nbsp;{'dl_start'|@translate}
+        </a>
+      </li>
+	  <li>
+        <a href="{$ROOT_URL}plugins/download_multi/include/DmPanier.php?DmAction=delcart" rel="nofollow" />
+          <img src="{$ROOT_URL}plugins/download_multi/template/images/cart_delete.png">&nbsp;{'dl_trash'|@translate}
+        </a>
+      </li>
+	  <li>
+        <a href="{$ROOT_URL}plugins/download_multi/include/DmPanier.php" rel="nofollow" />
+          <img src="{$ROOT_URL}plugins/download_multi/template/images/folder.png">&nbsp;{'dl_archive'|@translate}
+        </a>
+      </li>
+    </ul>
+  </dd>
Index: /extensions/Download_Multi/template/DmPanier.tpl
===================================================================
--- /extensions/Download_Multi/template/DmPanier.tpl	(revision 3986)
+++ /extensions/Download_Multi/template/DmPanier.tpl	(revision 3986)
@@ -0,0 +1,94 @@
+{$MENUBAR}
+
+{if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if}
+
+<div id="content" class="content">
+  <div class="titrePage">
+  {if !empty($PLUGIN_INDEX_PANIER_BEFORE) }{$PLUGIN_INDEX_PANIER_BEFORE}{/if}
+    <ul class="categoryActions">
+	  <li>
+        <a href="{$preview.U_HOME}" title="{'home_hint'|@translate}">
+          <img src="{$ROOT_URL}{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}" />
+        </a>
+      </li>
+      <li>
+        <a href="{$preview.U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}">
+          <img src="{$ROOT_URL}{$themeconf.icon_dir}/help.png" class="button" alt="(?)" />
+        </a>
+      </li>
+    </ul>
+    
+    {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}
+    
+	<h2>{'dl_title_telechargement'|@translate}</h2>
+  </div>
+  
+{if !empty($PLUGIN_INDEX_CONTENT_BEGIN)}{$PLUGIN_INDEX_CONTENT_BEGIN}{/if}
+  
+  {if isset($errors)}
+  <div class="errors">
+    <ul>
+      {foreach from=$errors item=error}
+      <li>{$error}</li>
+      {/foreach}
+    </ul>
+  </div>
+  {/if}
+  
+  {if isset($waiting)}
+  <script>
+    document.getElementById('conteneur').style.display = "none";
+    document.getElementById('content-progress').style.display = "none";
+  </script>
+  {/if}
+  
+  {if !empty($prefix)}
+  <form name="prefix" id="prefix" action="{$prefix.F_ACTION}" method="post" class="filter">
+    <fieldset>    
+    <legend>{'dl_prefix_file'|@translate}</legend>
+	  <input id="nom" name="nom" type="text" value="{$prefix.VALUE}" maxlength="20">
+      <input id="submit" type="submit" value="{'dl_prefix_button'|@translate}">
+    </fieldset>
+  </form>
+  {/if}
+  
+  {if !empty($telechargements)}
+  <form id="user_dir" action="{$F_ACTION}" method="post"> 
+  <table>
+    <thead>
+      <tr>
+        <th>{'dl_th_file'|@translate}</th>
+        <th>{'dl_th_date'|@translate}</th>
+        <th>{'dl_th_action'|@translate}</th>
+      </tr>
+    </thead>
+    {foreach from=$telechargements item=telechargement}
+    <tr>
+      <td>
+        <a href="{$telechargement.FIC_CHEMIN}{$telechargement.FIC_NAME}">
+          <img src="{$ROOT_URL}plugins/download_multi/template/images/bullet_disk.png">&nbsp;
+            {$telechargement.FIC_NAME}
+        </a>
+      </td>
+      <td>{$telechargement.FIC_DATE}</td>
+      <td>	
+        <input type="checkbox" name="fic[]" value="{$telechargement.FIC_NAME}">
+      </td>
+    </tr>
+    {/foreach}
+    <tr>
+      <td colspan="3">
+        <input name="all" type="button" value="{'dl_bt_select'|@translate}" OnClick="cocher('user_dir');" />
+        <input name="reset" type="reset" value="{'dl_bt_unselect'|@translate}" />
+        <input name="select" type="submit" value="{'dl_bt_delete'|@translate}" />
+      </td>
+    </tr>
+  </table>
+  </form>
+  {/if}
+  
+  {if !empty($PLUGIN_INDEX_CONTENT_END) }{$PLUGIN_INDEX_CONTENT_END}{/if}
+  
+</div> <!-- content -->
+
+{if !empty($PLUGIN_INDEX_CONTENT_AFTER)}{$PLUGIN_INDEX_CONTENT_AFTER}{/if}
Index: /extensions/Download_Multi/template/DmPreview.tpl
===================================================================
--- /extensions/Download_Multi/template/DmPreview.tpl	(revision 3986)
+++ /extensions/Download_Multi/template/DmPreview.tpl	(revision 3986)
@@ -0,0 +1,66 @@
+{$MENUBAR}
+
+{if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if}
+
+<div id="content" class="content">
+  <div class="titrePage">
+    <ul class="categoryActions">
+	  <li>
+        <a href="{$preview.U_HOME}" title="{'home_hint'|@translate}">
+          <img src="{$ROOT_URL}{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}" />
+        </a>
+      </li>
+      <li>
+        <a href="{$preview.U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}">
+          <img src="{$ROOT_URL}{$themeconf.icon_dir}/help.png" class="button" alt="(?)" />
+        </a>
+      </li>
+    </ul>
+    
+    {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}
+    
+	<h2>{'dl_title_telechargement'|@translate}</h2>
+  </div>
+  
+{if !empty($PLUGIN_INDEX_CONTENT_BEGIN)}{$PLUGIN_INDEX_CONTENT_BEGIN}{/if}
+  
+  {if isset($errors)}
+  <div class="errors">
+    <ul>
+      {foreach from=$errors item=error}
+      <li>{$error}</li>
+      {/foreach}
+    </ul>
+  </div>
+  {/if} 
+  
+  {if !empty($thumbnails)}  
+  <ul class="thumbnails">
+    {foreach from=$thumbnails item=thumbnail}
+    <li>
+      <span class="wrap1">
+        <span class="wrap2">
+          <a href="{$thumbnail.URL}">
+            <img class="thumbnail" src="{$thumbnail.TN_SRC}" alt="{$thumbnail.NAME}" title="{$thumbnail.NAME}" />
+          </a>
+        </span>
+        <span class="thumbLegend">
+          <form id="delete_image" action="DmPreview.php" method="post">
+            <img src="{$ROOT_URL}plugins/download_multi/template/images/{$thumbnail.IMG}" alt="{$thumbnail.TYPE}" title="{$thumbnail.TYPE}" />&nbsp;{$thumbnail.TYPE}
+            <input class="DmCheckBox" name="id_image" type="image" style="border: 0px" src="{$ROOT_URL}plugins/download_multi/template/images/cancel.png" alt="{'delete'|@translate}" title="{'delete'|@translate}" />              
+            <input name="action" type="hidden" value="del" />
+            <input name="id_image" type="hidden" value="{$thumbnail.F_ID_IMAGE}" />
+            <input name="type" type="hidden" value="{$thumbnail.F_TYPE}" />
+          </form>
+        </span>        
+      </span>
+    </li>
+    {/foreach}
+  </ul> 
+  {/if} 
+  
+  {if !empty($PLUGIN_INDEX_CONTENT_END) }{$PLUGIN_INDEX_CONTENT_END}{/if}
+  
+</div> <!-- content -->
+
+{if !empty($PLUGIN_INDEX_CONTENT_AFTER)}{$PLUGIN_INDEX_CONTENT_AFTER}{/if}
Index: /extensions/Download_Multi/template/DmWaiting.tpl
===================================================================
--- /extensions/Download_Multi/template/DmWaiting.tpl	(revision 3986)
+++ /extensions/Download_Multi/template/DmWaiting.tpl	(revision 3986)
@@ -0,0 +1,19 @@
+{if isset($waiting)}
+<div class="content-progress" id="content-progress" style="display:none;">
+  <div id="conteneur" style="display:none; width:auto; height:50px;">
+    <div class="progress" id="progress" style="width:0%; height: 50px; background-color:white">
+      <div class="progress-barre">
+        <div id="pourcentage" style="font-size:30px">&nbsp;</div>
+      </div>    
+    </div>
+  </div>
+
+  <script>document.getElementById('content-progress').style.display = "block";</script>
+  <script>document.getElementById('conteneur').style.display = "block";</script>
+  
+  <script>
+    document.getElementById('pourcentage').innerHTML='{$waiting}%';
+    document.getElementById('progress').style.width='{$waiting}%';
+  </script>
+</div>
+{/if}
Index: /extensions/Download_Multi/template/admin.tpl
===================================================================
--- /extensions/Download_Multi/template/admin.tpl	(revision 3986)
+++ /extensions/Download_Multi/template/admin.tpl	(revision 3986)
@@ -0,0 +1,89 @@
+{include file='include/autosize.inc.tpl'}
+
+<div class="titrePage">
+  <h2>{'dl_title'|@translate}</h2>
+</div>
+  
+<form method="post" action="{$F_ACTION}" class="properties">
+
+<fieldset id="mainConf">
+  <ul>
+    <li>
+      <span class="property">
+        <label for="downloadmulti_active_comment">{'dl_zip_active_comment'|@translate}</label>        
+      </span>
+      <input type="checkbox" name="downloadmulti_active_comment" id="downloadmulti_active_comment"{$DOWNLOADMULTI_ACTIVECOMMENT} />
+    </li>
+
+    <li>
+      <span class="property">
+        <label for="downloadmulti_comment">{'dl_zip_comment'|@translate}</label>
+      </span>
+      <input type="text" maxlength="255" size="50" name="downloadmulti_comment" id="downloadmulti_comment" value="{$DOWNLOADMULTI_COMMENT}" />
+    </li>
+
+    <li>
+      <span class="property">
+        <label for="downloadmulti_group">{'dl_group_id'|@translate}</label>
+      </span>
+      <select name="downloadmulti_group[]" size="{$downloadmulti_group_id|@count}" MULTIPLE>
+        {html_options values=$downloadmulti_group_id output=$downloadmulti_group_name selected=$downloadmulti_group_select}        
+      </select>
+    </li>    
+
+    <li>
+      <span class="property">
+        <label for="downloadmulti_archive_size">{'dl_max_size'|@translate} (<a href="http://www.docmemo.com/informatique/unitesinf.php" target="_blank" title="Conversion en ligne">{'dl_converter'|@translate}</a>)</label>
+      </span>
+      <input type="text" maxlength="255" size="50" name="downloadmulti_archive_size" id="downloadmulti_archive_size" value="{$DOWNLOADMULTI_ARCHIVE_SIZE}" />
+    </li>
+
+    <li>
+      <span class="property">
+        <label for="downloadmulti_prefix">{'dl_zip_prefix'|@translate}</label>
+      </span>
+      <input type="text" maxlength="255" size="50" name="downloadmulti_prefix" id="downloadmulti_prefix" value="{$DOWNLOADMULTI_PREFIX}" />
+    </li>
+    
+    <li>
+      <span class="property">
+        <label for="downloadmulti_prefix_dir">{'dl_zip_dir_prefix'|@translate}</label>
+      </span>      
+      <input type="text" maxlength="255" size="50" name="downloadmulti_prefix_dir" id="downloadmulti_prefix_dir" value="{$DOWNLOADMULTI_PREFIX_DIR}" />
+    </li>
+    
+    <li>
+      <span class="property">
+        <label for="downloadmulti_pattern_name">{'dl_zip_pattern_name'|@translate}</label>
+      </span>      
+      <input type="text" maxlength="255" size="50" name="downloadmulti_pattern_name" id="downloadmulti_pattern_name" value="{$DOWNLOADMULTI_PATTERN_NAME}" />
+    </li> 
+
+    <li>
+      <span class="property">
+        <label for="downloadmulti_select_dl">{'dl_select_dl'|@translate}</label>
+      </span>
+      {html_options name=downloadmulti_select_dl options=$downloadmulti_select_dl selected=$select_dl}
+    </li>
+
+    <li>
+      <span class="property">
+        <label for="downloadmulti_create_category">{'dl_create_category'|@translate}</label>
+      </span>
+      <input type="checkbox" name="downloadmulti_create_category" id="downloadmulti_create_category"{$DOWNLOADMULTI_CREATECATEGORY} />
+    </li>         
+    
+  </ul>
+</fieldset>
+
+<input type="hidden" name="downloadmulti_post_form" id="downloadmulti_post_form" value="1" />
+<p><input type="submit" value="{'Submit'|@translate}" /></p>
+</form>
+
+<fieldset id="mainConf">
+    <legend>{'dl_title_information'|@translate}</legend>
+    <ul>
+      <li>{'dl_class_zip'|@translate}{$DmServeurConfiguration.ZIP}</li>
+      <li>PHP : {$DmServeurConfiguration.PHP_VERSION}</li>
+    </ul>
+</fieldset>
Index: /extensions/Download_Multi/template/index.php
===================================================================
--- /extensions/Download_Multi/template/index.php	(revision 3986)
+++ /extensions/Download_Multi/template/index.php	(revision 3986)
@@ -0,0 +1,35 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch        : BSF (Best So Far)
+// | file          : $RCSfile$
+// | last update   : $Date: 2006-07-18 23:38:54 +0200 (mar., 18 juil. 2006) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1481 $
+// +-----------------------------------------------------------------------+
+// | 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 of index.php
+
+$url = '../index.php';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
