23 function htm($result, $sumArray, $title, $weighArray, $headerArray){
26 $active_app = Router::get_application();
27 $file = md5(uniqid());
32 <title>REPORTE DE ".strtoupper($title).
"</title>
34 <body bgcolor='white'>
35 <div style='font-size:20px;font-family:Verdana;color:#000000'>".strtoupper(
$config->$active_app->name).
"</div>\n
36 <div style='font-size:18px;font-family:Verdana;color:#000000'>REPORTE DE ".strtoupper($title).
"</div>\n
37 <div style='font-size:18px;font-family:Verdana;color:#000000'>".date(
"Y-m-d").
"</div>\n
39 <table cellspacing='0' border=1 style='border:1px solid #969696'>
41 $content.=
"<tr bgcolor='#F2F2F2'>\n";
42 for($i=0;$i<=count($headerArray)-1;$i++){
43 $content.=
"<th style='font-family:Verdana;font-size:12px'>".$headerArray[$i].
"</th>\n";
48 foreach($result as $row){
49 $content.=
"<tr bgcolor='white'>\n";
50 for($i=0;$i<=count($row)-1;$i++){
51 if(is_numeric($row[$i])){
52 $content.=
"<td style='font-family:Verdana;font-size:12px' align='center'>{$row[$i]}</td>";
54 $content.=
"<td style='font-family:Verdana;font-size:12px'>{$row[$i]} </td>";
61 file_put_contents(
"public/temp/$file.html", $content);
63 if(isset($raw_output)){
64 print
"<script type='text/javascript'> window.open('".KUMBIA_PATH.
"temp/".$file.
".html', null); </script>";
66 Generator::forms_print(
"<script type='text/javascript'> window.open('".KUMBIA_PATH.
"temp/".$file.
".html', null); </script>");