source: branches/2.3/contactcenter/inc/cc_updown.php @ 4858

Revision 4858, 812 bytes checked in by rafaelraymundo, 13 years ago (diff)

Ticket #2072 - Erro ao exportar contatos no IE..........

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2        require_once '../../header.session.inc.php';
3//      This script upload an CSV file to import contacts .... 
4        if($ftmp = $_FILES['import_file']['tmp_name']){                                         
5                $fname = ini_get("session.save_path").'/'."contacts_".md5(microtime()).".swp";                                 
6                if(move_uploaded_file($ftmp, $fname))   
7                        $_SESSION['contactcenter']['importCSV'] = $fname;               
8        }               
9//      ... or download an CSV file to export contacts.
10        else if($_GET['file_name']) {   
11                $file_name = $_GET['file_name'];       
12                $file_path = $_GET['file_path'];
13                header("Pragma: public");
14                header ("Content-Type: application/octet-stream");
15                header ("Cache-Control: must-revalidate, post-check=0, pre-check=0");
16                header('Content-Length: ' . filesize($file_path));
17                header("Content-disposition: attachment; filename=".$file_name);
18                readfile($file_path);
19        }
20?>
Note: See TracBrowser for help on using the repository browser.