source: extensions/Download_Multi/include/DmPanier.php @ 8821

Last change on this file since 8821 was 3986, checked in by flipflip, 14 years ago

Initial Import

File size: 3.8 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | Mod Name : Download_multi                                             |
4// | Mod Version : 0.9-1                                                   |
5// | Mod Orignal author: Tboris                                            |
6// | Mod Second author : Cestlodovic                                       |
7// | Mod Version author : FlipFlip <flipflip@free.fr>                      |
8// | Mod description :                                                     |
9// | Ce module est base sur le module existant pour le telechargement,     |
10// | cette version permet le telechargement sur plusieurs pages.           |
11// +-----------------------------------------------------------------------+
12// | This program is free software; you can redistribute it and/or modify  |
13// | it under the terms of the GNU General Public License as published by  |
14// | the Free Software Foundation                                          |
15// |                                                                       |
16// | This program is distributed in the hope that it will be useful, but   |
17// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
18// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
19// | General Public License for more details.                              |
20// |                                                                       |
21// | You should have received a copy of the GNU General Public License     |
22// | along with this program; if not, write to the Free Software           |
23// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
24// | USA.                                                                  |
25// +-----------------------------------------------------------------------+
26
27//--------------------------------------------------------------------- include
28define('PHPWG_ROOT_PATH','../../../');
29include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
30
31check_status(ACCESS_CLASSIC);
32
33// Récupération de la class du plugin
34$DownloadMulti = get_plugin_data('download_multi');
35
36$title = ' Download Multi : Panier';
37$page['body_id'] = 'DownloadMulti';
38$page['section'] = '';
39include(PHPWG_ROOT_PATH.'include/page_header.php');
40
41// include menubar
42include(PHPWG_ROOT_PATH.'include/menubar.inc.php');
43
44$template->set_filenames(
45  array('DownloadMulti_panier' => $DownloadMulti->plugin_path.'/template/DmPanier.tpl')
46);
47
48if(isset($_GET['DmAction'])) {
49  $DmAction = $_GET['DmAction'];
50}
51
52if(isset($_POST['DmPanier'])) {
53  $url = get_root_url().$_POST['DmPanier'];
54}
55
56$template->assign('preview',
57  array(
58    'U_HOME' => duplicate_index_URL(),
59    'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=download_multi'
60  )
61);
62
63if(isset($DmAction)) {
64  switch($DmAction) {
65    // Formulaire pour choisir
66    // un préfix différent que
67    // celui par défaut
68    case 'name':
69      $DownloadMulti->DmPanierPrefixZip();
70    break;
71
72    // Génération des fichiers zip
73    case 'genfic':
74          if(isset($_POST['nom'])) {
75        $prefix = $_POST['nom'];
76      }
77      $DownloadMulti->DmPanierGenZip($prefix);
78    break;
79
80    // Liste le répertoire utilisateur
81    case 'liste':
82      $DownloadMulti->DmPanierListeDir();
83    break;
84
85    // Vide les archives
86    case 'del':
87          if(isset($_POST['fic'])) {
88        $fic = $_POST['fic'];
89      }
90      $DownloadMulti->DmPanierDelUserDir($fic);
91      $DownloadMulti->DmPanierListeDir();
92    break;
93
94    // Vide le panier
95    case 'delcart':
96      $DownloadMulti->DmPanierDelete();
97    break;
98
99    default:
100      $DownloadMulti->DmPanierListeDir();
101    break;
102  }
103} else {
104  $DownloadMulti->DmPanierListeDir();
105}
106
107$template->parse('DownloadMulti_panier');
108
109include(PHPWG_ROOT_PATH.'include/page_tail.php');
110?>
Note: See TracBrowser for help on using the repository browser.