source: branches/1.2/contactcenter/inc/cc_updown.php @ 2

Revision 2, 738 bytes checked in by niltonneto, 17 years ago (diff)

Removida todas as tags usadas pelo CVS ($Id, $Source).
Primeira versão no CVS externo.

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