source: extensions/download_multi/include/DmPreview.php @ 28338

Last change on this file since 28338 was 3986, checked in by flipflip, 15 years ago

Initial Import

File size: 3.4 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//----------------------------------------------------- template initialization
34//
35// Start output of page
36//
37$title = ' Download Multi : Panier';
38$page['body_id'] = 'DownloadMulti';
39$page['section'] = '';
40include(PHPWG_ROOT_PATH.'include/page_header.php');
41
42// Récupération de la class du plugin
43$DownloadMulti = get_plugin_data('download_multi');
44
45$template->set_filenames(
46  array('DownloadMulti_preview' => $DownloadMulti->plugin_path.'/template/DmPreview.tpl')
47);
48
49if(isset($_POST['action'])) {
50  $action = $_POST['action'];
51} else {
52  $action = '';
53}
54
55if(isset($_POST['DmCategory'])) {
56  $url = get_root_url().$_POST['DmCategory'];
57}
58
59$template->assign(
60      'preview',
61        array(
62          'U_HOME' => make_index_url(),
63          'U_HELP' => get_root_url().'popuphelp.php?page=download_multi',
64        )
65      );
66
67switch($action) {
68  case 'del':
69    // Supprime une image du panier
70    $id_image = $_POST['id_image'];
71    $type = $_POST['type'];
72    $DownloadMulti->DmPreviewDel($id_image, $type);
73    $DownloadMulti->DmPreviewList();
74  break;
75
76  default:
77    // Affiche la liste des images
78    // dans le panier de l'utilisateur
79    $DownloadMulti->DmPreviewList();
80  break;
81}
82
83// include menubar
84include(PHPWG_ROOT_PATH.'include/menubar.inc.php');
85
86$template->parse('DownloadMulti_preview');
87include(PHPWG_ROOT_PATH.'include/page_tail.php');
88?>
Note: See TracBrowser for help on using the repository browser.