phpDocumentor VFront
[ class tree: VFront ] [ index: VFront ] [ all elements ]

Source for file mexcel.php

Documentation is available at mexcel.php

  1. <?php
  2. /**
  3. * Script generatore di tabella Excel dinamica.
  4. * La generazione della tabella excel avviene mediante uso di una semplice tabella HTML
  5. * e l'header XLS. Questo file è richiamato dal tasto "scarica la tabella in excel" creato
  6. * a sua volta dalla funzione magic_excel.
  7. @see function magic_excel
  8. @package VFront
  9. @author Mario Marcello Verona <marcelloverona@gmail.com>
  10. @copyright 2007 Mario Marcello Verona
  11. @version 0.90
  12. @license http://www.gnu.org/licenses/gpl.html GNU Public License
  13. */
  14.  
  15. if(isset($_POST['mexcel'])){
  16.     
  17.     
  18.     $_data=unserialize(base64_decode($_POST['mexcel']));
  19.     
  20.     print_r($data);
  21.  
  22.    $filename(isset($_data['fn']&& $_data['fn']!=''$_data['fn'"sheet.xls";
  23.    $titolo(isset($_data['tit']&& $_data['tit']!=''$_data['tit'"Tabella";
  24.    header ("Content-Type: application/vnd.ms-excel");
  25.    header ("Content-Dispositioninlinefilename=$filename");
  26. $OUT=<<<XLS
  27. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  28. <html lang=it><head>
  29. <title>$titolo</title></head>
  30. <style type="text/css">
  31. bodyfont-family:ArialSansfont-size:0.8em;}
  32. </style>
  33. <body>
  34. XLS;
  35.  
  36.  
  37. $OUT.=$_data['tab'];
  38.  
  39. $OUT.=<<<XLS
  40. </body></html>
  41. XLS;
  42. print $OUT;
  43. }
  44.  
  45. ?>

Documentation generated on Sat, 22 Sep 2007 11:51:02 +0200 by phpDocumentor 1.4.0a2