Ignore:
Timestamp:
May 16, 2011, 12:18:36 PM (13 years ago)
Author:
roby
Message:
  • adattata la funzione di visualizzazione dei pdf ad explorer
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/modules/Elezioni/foto.php

    r86 r99  
    1919if (isset($param['id_comune'])) $id_comune=intval($param['id_comune']); else $id_comune='';
    2020if (isset($param['prefix'])) $prefix=$param['prefix'];
    21 if (isset($param['pdf'])) $pdf=$param['pdf'];
     21if (isset($param['pdfvis'])) $pdf=$param['pdfvis'];
    2222
    2323if ($id_lista){
     
    5050if ($stemma=="" && is_readable('modules/Elezioni/images/vuoto.jpg')){
    5151        $stemma =  fread( fopen( 'modules/Elezioni/images/vuoto.jpg', 'r' ), filesize( 'modules/Elezioni/images/vuoto.jpg' ) );}
    52 if(isset($pdf)) header('Content-type: application/pdf');
     52if(isset($pdf))
     53{
     54  if (strstr($HTTP_USER_AGENT,"MSIE"))
     55    {
     56        header('Cache-Control: public');
     57        header("Content-Type: application/pdf");
     58        header("Content-Transfer-Encoding: binary");
     59        header("Content-Disposition: attachment; filename=Programma.pdf");
     60    }else{
     61        header("Content-type: application/pdf");
     62        header("Content-Disposition: attachment; filename=Programma.pdf");
     63    }
     64}
     65
    5366echo $stemma;
    5467?>
Note: See TracChangeset for help on using the changeset viewer.