source: trunk/contactcenter/inc/cc_updown.php @ 2363

Revision 2363, 1.5 KB checked in by amuller, 14 years ago (diff)

Ticket #1008 - Adicionando info sobre licença

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2
3        /***************************************************************************
4        * Expresso Livre                                                           *
5        * http://www.expressolivre.org                                             *
6        * --------------------------------------------                             *
7        *  This program is free software; you can redistribute it and/or modify it *
8        *  under the terms of the GNU General Public License as published by the   *
9        *  Free Software Foundation; either version 2 of the License, or (at your  *
10        *  option) any later version.                                              *
11        \**************************************************************************/
12        require_once '../../header.session.inc.php';
13//      This script upload an CSV file to import contacts .... 
14        if($ftmp = $_FILES['import_file']['tmp_name']){                                         
15                $fname = ini_get("session.save_path").'/'."contacts_".md5(microtime()).".swp";                                 
16                if(move_uploaded_file($ftmp, $fname))   
17                        $_SESSION['contactcenter']['importCSV'] = $fname;               
18        }               
19//      ... or download an CSV file to export contacts.
20        else if($_GET['file_name']) {   
21                $file_name = $_GET['file_name'];       
22                $file_path = $_GET['file_path'];
23                header ("Content-Type: application/octet-stream");
24                header ("Cache-Control: must-revalidate, post-check=0, pre-check=0");
25                header('Content-Length: ' . filesize($file_path));
26                header("Content-disposition: attachment; filename=".$file_name);
27                readfile($file_path);
28        }
29?>
Note: See TracBrowser for help on using the repository browser.