gest366/templates/prt_documenti/pdfgen.prt_documenti.php

62 lines
2.0 KiB
PHP

<?php
$module_name = "Anagrafiche";
include_once( $docroot."/lib/permissions_check.php" );
//carica report html
$report = file_get_contents ($docroot."/templates/prt_documenti/prt_documenti.html");
$body = file_get_contents ($docroot."/templates/prt_documenti/prt_documenti_body.html");
include_once( "pdfgen_variables.php" );
$search_tipo = $html->form('search_tipo');
$titolo = "Stampa Elenco Documenti ";
$body .= "<h3>".$titolo." dal ".date( "d/m/Y", strtotime($_SESSION['period_start']) )." al ".date( "d/m/Y", strtotime($_SESSION['period_end']) )."</h3>\n";
$body .= "<table class=\"table_values\" cellspacing=\"0\" border=\"0\" cellpadding=\"0\" style=\"table-layout:fixed; border-color:#aaa;\">\n";
$body .= "<col width=\"80\"><col width=\"200\"><col width=\"200\"><col width=\"225\"><col width=\"75\"><col width=\"100\">\n";
$body .= "<thead>\n";
$body .= " <tr>\n";
$body .= " <th style='padding:2mm; background:#eee;'>Data</th>\n";
$body .= " <th style='padding:2mm; background:#eee;'>Numero</th>\n";
$body .= " <th style='padding:2mm; background:#eee;'>Documento</th>\n";
$body .= " <th style='padding:2mm; background:#eee;'>Ragione Sociale</th>\n";
$body .= " <th style='padding:2mm; background:#eee;'>Totale</th>\n";
$body .= " <th style='padding:2mm; background:#eee;'>Stato</th>\n";
$body .= " </tr>\n";
$body .= "</thead>\n";
$body .= "<tbody>\n";
$query=$_SESSION['query_controller'] ;
$rs = $dbo->fetchArray($query);
for( $i=0; $i<sizeof($rs); $i++ ){
$body .= " <tr>";
$body .= " <td>".$rs[$i]['Data']."</td>\n";
$body .= " <td>".$rs[$i]['N° Doc°']."</td>\n";
$body .= " <td>".$rs[$i]['Documento']."</td>\n";
$body .= " <td>".$rs[$i]['Ragione sociale']."</td>\n";
$body .= " <td>".$rs[$i]['Totale']."</td>\n";
$body .= " <td>".$rs[$i]['icon_title_Stato']."</td>\n";
$body .= " </tr>\n";
}
$body .= "</tbody>\n";
$body .= "</table>\n";
$orientation = "L";
$report_name = "prt_anagrafiche.pdf";
?>