Changeset 99 for trunk


Ignore:
Timestamp:
May 16, 2011, 12:18:36 PM (13 years ago)
Author:
roby
Message:
  • adattata la funzione di visualizzazione dei pdf ad explorer
Location:
trunk/client/modules/Elezioni
Files:
2 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?>
  • trunk/client/modules/Elezioni/index.php

    r90 r99  
    714714                        <td class=\"table-main\"><h1>$descr_gruppo</h1> $var1</td>";
    715715                        if($tipo_cons!=2 and $prognome)
    716                                 echo "<td onmouseover=\"this.style.cursor='pointer';\" onclick=\"javascript:window.open('modules.php?name=Elezioni&amp;file=foto&amp;id_gruppo=$id_gruppo2&amp;pdf=1')\">";
     716                                echo "<td onmouseover=\"this.style.cursor='pointer';\" onclick=\"javascript:window.open('modules.php?name=Elezioni&amp;file=foto&amp;id_gruppo=$id_gruppo2&amp;pdfvis=1')\">";
    717717                        else echo "<td>";
    718718                        echo "<b><img class=\"stemma\" src=\"modules.php?name=Elezioni&amp;file=foto&amp;id_gruppo=$id_gruppo2\"   alt=\"immagine $descr_gruppo\" /><br>";
Note: See TracChangeset for help on using the changeset viewer.