source: extensions/UserCollections/admin/export.php @ 20090

Last change on this file since 20090 was 20090, checked in by mistic100, 11 years ago
  • add webservices
  • add mail function
  • add admin list
  • add admin export function
  • try to deal with Gthumb+
  • activate multisize dropdown menu of collection page

TODO : use webservices instead of toggle_image.php

File size: 949 bytes
Line 
1<?php
2if (!defined('USER_COLLEC_PATH')) die('Hacking attempt!');
3
4try {
5  $UserCollection = new UserCollection($_GET['col_id']);
6 
7  $template->assign('COL_ID', $_GET['col_id']);
8}
9catch (Exception $e)
10{
11  array_push($page['errors'], $e->getMessage());
12}
13
14
15if (isset($_POST['download']))
16{
17  $content = $UserCollection->serialize($_POST['content']);
18  $filename = 'collection_'.$_GET['col_id'].'_'.date('Ymd-Hi').'.csv';
19 
20  header('Content-Type: application/force-download; name="'.$filename.'"');
21  header('Content-Disposition: attachment; filename="'.$filename.'"');
22  header('Content-Description: File Transfer');
23  header('Content-Transfer-Encoding: binary');
24  header('Content-Length: '.strlen($content).'');
25
26  header('Cache-Control: no-cache, must-revalidate');
27  header('Pragma: no-cache');
28  header('Expires: 0');
29 
30  echo $content;
31  exit;
32}
33
34$template->set_filename('user_collections', dirname(__FILE__) . '/template/export.tpl');
35
36?>
Note: See TracBrowser for help on using the repository browser.