Example #1
0
 }
 // create table
 new_table(get_default_table('Tabella1', array(4, 9, 8)));
 add_table_header('Tabella1', array(EXPORT_SXW_COD, EXPORT_SXW_DENOM, EXPORT_SXW_NTEL), make_bold($oo_def_c));
 $where = implode(' AND ', $wh);
 $TIPI = array(1 => 'AVVR', 2 => 'CLIE', 3 => 'COLL', 4 => 'CONS', 5 => 'CORR', 6 => 'FORN');
 $q = $DB->Execute("     SELECT * \r\n                                                        FROM contact \r\n                                                        WHERE {$where}\r\n                                                        ORDER BY codice ASC");
 while ($l = $q->FetchRow()) {
     utf8_encode_array($l);
     if ($l[data] == '0000-00-00') {
         $l[data] = '';
     }
     add_table_row('Tabella1', array($l[codice], $rapida ? $l[nome] : "{$l['nome']}\n" . "{$l['indirizzo']}\n" . "{$l['cap']}\t{$l['citta']}\n" . "{$l['stato']}\t- {$l['leg_rap']}\n" . EXPORT_SXW_TYPE . ": " . $TIPI[$l[tipo]] . "\n" . EXPORT_SXW_DCOST . ": {$l['data']} - {$l['luogo']}", $rapida ? $l[telefono] : "{$l['telefono']}\n" . EXPORT_SXW_FAX . ":\t{$l['fax']}\n" . EXPORT_SXW_CFIS . "\t{$l['cod_fis']}\n" . EXPORT_SXW_PIVA . "\t{$l['piva']}\n" . EXPORT_SXW_ISCRCIAAA . ": {$l['iscr_ccia']}\n" . EXPORT_SXW_ISCRTRIB . ": {$l['iscr_trib']}\n" . EXPORT_SXW_PERSFIS . ": " . ($l[tipo_contatto] ? EXPORT_SXW_PERSFIS_NO : EXPORT_SXW_PERSFIS_YES) . "\n"), array($oo_def, $oo_def, $oo_def));
     // note
     if ($l[note] && in_array(1, $P[print_note]) && !$rapida) {
         add_table_row('Tabella1', array(EXPORT_SXW_NOTE . ": " . $l[note]), $oo_def);
     }
 }
 // create content
 $OO_PAGE_STYLE = set_page_style($PAGE_STYLE);
 $OO_PAGE_HEADER = set_page_header("#DATA#\t\t\t" . EXPORT_SXW_TIT_ANA . "\t\t" . EXPORT_SXW_TIT_PG . ": #PAGINA#");
 $OO_PAGE_FOOTER = '';
 // set_page_footer('#DATA# #ORA#');
 $header_style = array(color => '#000000', size => '12pt', align => 'start', face => 'Verdana');
 //$footer_style = array(color => '#ffff00', size => '12pt', align => 'end', face => 'Verdana');
 $OO_HEADER_STYLE = set_header_style($header_style);
 $OO_FOOTER_STYLE = '';
 // set_footer_style($footer_style);
 $OO_TABLE_STYLES = gen_table_style();
 $OO_TEXT .= render_table('Tabella1');
 $OO_FONT_STYLES = gen_font_style();
 $where = implode(' AND ', $wh);
 $q = mysql_query("      SELECT P.*,C.codice,C.nome \n                                                        FROM pratiche P\n\t\t\t\t\t\t\tLEFT JOIN contact C ON pr_ref_idcliente = C.id\n                                                        WHERE {$where}\n                                                        ORDER BY pr_codice ASC");
 while ($l = mysql_fetch_assoc($q)) {
     $op = $l[pr_operatore];
     $oper = is_array($OPER[$op]) ? $OPER[$op][0] . " (" . $OPER[$op][1] . ")" : '';
     $valore = 'Indeterminato';
     if ($l[pr_valore] == -2) {
         $valore = 'Indet/Extra';
     }
     if ($l[pr_valore] > 0) {
         $valore = nform($l[pr_valore]);
     }
     add_table_row('Tabella1', array($l[pr_codice] . "\n\nN. " . (int) $l[pr_numero], "Repertorio n. " . $l[pr_repertorio] . "\t\t" . "Cliente: " . $l[codice] . " (" . $l[nome] . ")\n" . $l[pr_oggetto] . "\n" . "Tipo: " . $l[pr_tipo] . " (" . $PRTIPO[$l[pr_tipo]] . ")\t\t" . "Operatore: " . $oper . "\n" . "Valore: {$valore}\t\tCrit.: " . $l[pr_criterio] . "\t\tFido:" . nform($l[pr_fido]) . "\n" . "Aut. C.: " . $l[pr_comp_cod] . " . " . $l[pr_comp_desc] . "\tN.Prov: " . $l[pr_nprovv] . "\n" . "Giud: " . $l[pr_giudice] . "\t\tN.Ruol: " . $l[pr_nruolo], "Ape: " . mysql_to_date($l[pr_data_inizio]) . "\n" . "Ins: " . mysql_to_date($l[pr_data_ins]) . "\n" . "Agg: " . mysql_to_date($l[pr_data_mod])), array($oo_ar10, $oo_ar10, $oo_ar10e));
     // note
     if ($l[note] && in_array(1, $P[print_note]) && !$rapida) {
         add_table_row('Tabella1', array("NOTE: " . $l[note]), $oo_ar10);
     }
 }
 // create content
 $OO_PAGE_STYLE = set_page_style($PAGE_STYLE);
 $OO_PAGE_HEADER = set_page_header("#DATA#\t\t\t\tELENCO PRATICHE\t\tPag.: #PAGINA#");
 $OO_PAGE_FOOTER = '';
 // set_page_footer('#DATA# #ORA#');
 $header_style = array(color => '#000000', size => '12pt', align => 'start', face => 'Verdana');
 //$footer_style = array(color => '#ffff00', size => '12pt', align => 'end', face => 'Verdana');
 $OO_HEADER_STYLE = set_header_style($header_style);
 $OO_FOOTER_STYLE = '';
 // set_footer_style($footer_style);
 $OO_TABLE_STYLES = gen_table_style();
 $OO_TEXT .= render_table('Tabella1');
 $OO_FONT_STYLES = gen_font_style();
     add_table_row('Tabella2', array(EXPORT_SXW_F_TOTANT, $p_tot_ant), array($oo_def, $oo_def_e));
     add_table_row('Tabella2', array('', '----------------------'), array($oo_def, $oo_def_e));
     $tot1 -= sprintf('%.2f', $tot_ant);
 }
 // LORDO
 $p_totale_lordo = nform($tot1 * $n_val, 0, $n_dec, $n_tho);
 add_table_row('Tabella2', array(EXPORT_SXW_F_TOTLOR, $p_totale_lordo), array($oo_def, $oo_def_e));
 // RITENUTA
 $p_imp_irpef = nform($imp_irpef * $n_val, 0, $n_dec, $n_tho);
 $p_ritenuta_acconto = nform($imp_irpef * ($rit_acc / 100) * $n_val, 0, $n_dec, $n_tho);
 add_table_row('Tabella2', array(sprintf(EXPORT_SXW_F_RITACC, $rit_acc, $n_cod, $p_imp_irpef), $p_ritenuta_acconto), array($oo_def, $oo_def_e));
 $tot1 -= $imp_irpef * ($rit_acc / 100);
 // TOTALE DOVUTO
 add_table_row('Tabella2', array('', '----------------------'), array($oo_def, $oo_def_e));
 $p_totale_dovuto = nform($tot1 * $n_val, 0, $n_dec, $n_tho);
 add_table_row('Tabella2', array(EXPORT_SXW_F_TOTDOV, $p_totale_dovuto), array($oo_def, $oo_def_e));
 // create content
 $OO_PAGE_STYLE = set_page_style($PAGE_STYLE);
 $OO_PAGE_HEADER = '';
 $OO_PAGE_FOOTER = '';
 $OO_HEADER_STYLE = '';
 $OO_FOOTER_STYLE = '';
 $OO_TABLE_STYLES = gen_table_style();
 $OO_TEXT .= render_table('Tabella1');
 $OO_TEXT .= print_text("\n", $oo_def);
 $OO_TEXT .= render_table('Tabella2');
 $OO_FONT_STYLES = gen_font_style();
 $url = make_sxw($filename);
 //print "$save_doc-".$P['dest_prat'][realval][0]."-".$P['ref_id'][realval][0]."-".$_SESSION[user][ref_prat]."<br>";
 // salvataggio come documento
 if ($save_doc == 1) {
Example #4
0
// note: "name" must be unique!
$tab = array(name => 'Tabella1', width => '18.00', cols => 3, border => '0.002cm solid #000000', padding => '0.5', bg_header => '#dddddd', bg_rows => '#ffffff', col_width => array(10.0, 2.0, 4.0));
new_table($tab);
add_table_header('Tabella1', array('nome', 'cognome', 'indirizzo'), $ver_12, false);
add_table_row('Tabella1', array('valerio', 'morettini', 'via pratesi'), $ver_12);
add_table_row('Tabella1', array('mario', 'rossi', 'via rossi d fsd fsd fds fd sfsd fsdf'), $ver_12_b);
add_table_row('Tabella1', array('mar2io', 'ross2i', 'via ross2i'), $ar_20_b_u);
add_table_row('Tabella1', array('valerio', 'morettini', 'via pratesi'), $ver_12);
add_table_row('Tabella1', array('mario'), $ver_12_b);
add_table_row('Tabella1', array('mar2io', 'ross2i', 'via ross2i'), $ar_20_b_u);
add_table_row('Tabella1', array('valerio', 'm', 'via pratesi'), $ver_12);
add_table_row('Tabella1', array('mario', 'rossi', 'via rossi d fsd fsd fds fd sfsd fsdf'), $ver_12_b);
add_table_row('Tabella1', array('mar2io', 'ross2i', 'via ross2i'), $ar_20_b_u);
add_table_row('Tabella1', array('valerio', 'morettini', 'via pratesi'), $ver_12);
add_table_row('Tabella1', array('mario', 'rossi', 'via rossi d fsd fsd fds fd sfsd fsdf'), $ver_12_b);
add_table_row('Tabella1', array('mar2io', 'ross2i', 'via ross2i'), $ar_20_b_u);
// create content
$OO_PAGE_STYLE = set_page_style($PAGE_STYLE);
$OO_PAGE_HEADER = set_page_header('Pagina #PAGINA# di #PAGINE#');
$OO_PAGE_FOOTER = set_page_footer('#DATA# #ORA#');
$header_style = array(color => '#ff0000', size => '12pt', align => 'end', face => 'Verdana');
$footer_style = array(color => '#ffff00', size => '12pt', align => 'end', face => 'Verdana');
$OO_HEADER_STYLE = set_header_style($header_style);
$OO_FOOTER_STYLE = set_footer_style($footer_style);
$OO_TABLE_STYLES = gen_table_style();
$OO_TEXT = print_text("Prova prova prova \t\t pd fsfd dsfds fsd fds s fds \nfds sd sd s fs frova prova", $ver_12_b);
$OO_TEXT .= render_table('Tabella1');
$OO_FONT_STYLES = gen_font_style();
$content = read_file('modello/content.xml');
$styles = read_file('modello/styles.xml');
$styles = ereg_replace("\t*<OO_PAGE_STYLE/>\r?\n?", $OO_PAGE_STYLE, $styles);
Example #5
0
     $GRP[$l[id]][] = $l[nome];
 }
 utf8_encode_array($GRP);
 //intestazione: info cliente
 // create table
 new_table(get_default_table('Tabella1', array(5, 8, 4, 4)));
 add_table_header('Tabella1', array(EXPORT_SXW_NAME, EXPORT_SXW_DESCR, EXPORT_SXW_TYPE, EXPORT_SXW_TAR), make_bold($oo_def_c));
 $where = implode(' AND ', $wh);
 $q = $DB->Execute("     SELECT * \r\n                                                        FROM gruppi \r\n                                                        WHERE {$where}\r\n                                                        ORDER BY name ASC");
 $TIPI = array(EXPORT_SXW_T_GRP, EXPORT_SXW_T_DEP, EXPORT_SXW_T_OFF);
 while ($l = $q->FetchRow()) {
     utf8_encode_array($l);
     add_table_row('Tabella1', array($l[name], $l[descr], $TIPI[$l[tipo]], nform($l[on_orar])), array($oo_def_c, $oo_def, $oo_def_c, $oo_def_c));
     // note
     if (is_array($GRP[$l[id]]) && $P[print_note] == 1) {
         add_table_row('Tabella1', array(EXPORT_SXW_USERS . ": " . implode(", ", $GRP[$l[id]])), $oo_def);
     }
 }
 // create content
 $OO_PAGE_STYLE = set_page_style($PAGE_STYLE);
 $OO_PAGE_HEADER = set_page_header("#DATA#\t\t\t\t" . EXPORT_SXW_TIT_GRP . "\t\t\t" . EXPORT_SXW_TIT_PG . ": #PAGINA#");
 $OO_PAGE_FOOTER = '';
 // set_page_footer('#DATA# #ORA#');
 $header_style = array(color => '#000000', size => '12pt', align => 'start', face => 'Verdana');
 //$footer_style = array(color => '#ffff00', size => '12pt', align => 'end', face => 'Verdana');
 $OO_HEADER_STYLE = set_header_style($header_style);
 $OO_FOOTER_STYLE = '';
 // set_footer_style($footer_style);
 $OO_TABLE_STYLES = gen_table_style();
 $OO_TEXT .= render_table('Tabella1');
 $OO_FONT_STYLES = gen_font_style();
Example #6
0
 $PAGE_STYLE[height] = 29.7;
 //intestazione: info cliente
 // create table
 new_table(get_default_table('Tabella1', array(1.6, 5.7, 1.5, 1.5, 1.5, 1.7, 1.5, 1.5, 1.7, 1.4, 1.4)));
 add_table_header('Tabella1', array(EXPORT_SXW_TAR_COD, EXPORT_SXW_TAR_DESCIMP, EXPORT_SXW_TAR_DIR, EXPORT_SXW_TAR_STRA, EXPORT_SXW_TAR_PENA, EXPORT_SXW_TAR_CONC, EXPORT_SXW_TAR_PRET, EXPORT_SXW_TAR_TRIB, EXPORT_SXW_TAR_AMMN, EXPORT_SXW_TAR_CA, EXPORT_SXW_TAR_CC), make_bold($oo_def_c));
 $where = implode(' AND ', $wh);
 $q = $DB->Execute("      SELECT * \r\n                                                        FROM INT_tariffe \r\n                                                        WHERE {$where}\r\n                                                        ORDER BY tatid ASC");
 while ($l = $q->FetchRow()) {
     utf8_encode_array($l);
     if ($l[tat_imp_molt] == '') {
         $l[tat_imp_molt] = ' ';
     }
     if ($l[tat_nonimp_molt] == '') {
         $l[tat_nonimp_molt] = ' ';
     }
     add_table_row('Tabella1', array($l[tatid], $rapida ? $l[tat_desc] : "{$l['tat_desc']}\n" . EXPORT_SXW_SPE . ":\t" . nform($l[tat_imp]) . " ({$l['tat_imp_molt']})" . "  " . nform($l[tat_nonimp]) . " ({$l['tat_nonimp_molt']})", $rapida ? '' : $l[tat_diritti], $rapida ? '' : $l[tat_stragiudiziali], $rapida ? '' : $l[tat_ccostituzionale], $rapida ? '' : $l[tat_conciliazione], $rapida ? '' : $l[tat_pretura], $rapida ? '' : $l[tat_tribunale], $rapida ? '' : $l[tat_amministrative], $rapida ? '' : $l[tat_cappello], $rapida ? '' : $l[tat_ccassazione]), array($oo_def_c, $oo_def, $oo_def_c, $oo_def_c, $oo_def_c, $oo_def_c, $oo_def_c, $oo_def_c, $oo_def_c, $oo_def_c, $oo_def_c));
 }
 // create content
 $OO_PAGE_STYLE = set_page_style($PAGE_STYLE);
 $OO_PAGE_HEADER = set_page_header("#DATA#\t\t\t\t" . EXPORT_SXW_TIT_TAR . "\t\t\t" . EXPORT_SXW_TIT_PG . ": #PAGINA#");
 $OO_PAGE_FOOTER = '';
 // set_page_footer('#DATA# #ORA#');
 $header_style = array(color => '#000000', size => '12pt', align => 'start', face => 'Verdana');
 //$footer_style = array(color => '#ffff00', size => '12pt', align => 'end', face => 'Verdana');
 $OO_HEADER_STYLE = set_header_style($header_style);
 $OO_FOOTER_STYLE = '';
 // set_footer_style($footer_style);
 $OO_TABLE_STYLES = gen_table_style();
 $OO_TEXT .= render_table('Tabella1');
 $OO_FONT_STYLES = gen_font_style();
 $url = make_sxw($filename);
Example #7
0
         for ($i = 1; $i < $righe_ann; $i++) {
             $txt .= "\n";
         }
         add_table_row($curtab[name], array($txt), $oo_def);
     }
     $cur_row++;
 }
 //render last table
 if (in_array(3, $_GET[print_note])) {
     $OO_TEXT .= render_table($curtab[name]);
 }
 //operators
 new_table($tab3);
 add_table_header('Tabella3', array(EXPORT_CODE, EXPORT_USER), make_bold($oo_def_c));
 foreach ($used_operators as $k => $v) {
     add_table_row('Tabella3', array($OPER[$k][0], $OPER[$k][1]), array($oo_def_c, $oo_def));
 }
 // create content
 $OO_PAGE_STYLE = set_page_style($PAGE_STYLE);
 $OO_PAGE_HEADER = set_page_header("#DATA#\t\t\t\t" . EXPORT_SXW_TIT_SCA . "\t\t" . EXPORT_SXW_TIT_PG . ": #PAGINA#");
 $OO_PAGE_FOOTER = '';
 // set_page_footer('#DATA# #ORA#');
 $header_style = array(color => '#000000', size => '12pt', align => 'start', face => 'Verdana');
 //$footer_style = array(color => '#ffff00', size => '12pt', align => 'end', face => 'Verdana');
 $OO_HEADER_STYLE = set_header_style($header_style);
 $OO_FOOTER_STYLE = '';
 // set_footer_style($footer_style);
 $OO_TABLE_STYLES = gen_table_style();
 if (!in_array(3, $_GET[print_note])) {
     $OO_TEXT .= render_table('Tabella1');
 }
Example #8
0
     if ($l[tat_imp_molt] == '') {
         $l[tat_imp_molt] = ' ';
     }
     if ($l[tat_nonimp_molt] == '') {
         $l[tat_nonimp_molt] = ' ';
     }
     // gruppi
     $gpr = '';
     if (is_array($GRP[$l[id]])) {
         $gpr = "\n" . EXPORT_SXW_GROUPS . ": ";
         foreach ($GRP[$l[id]] as $g) {
             $gpr .= "{$g}, ";
         }
         $gpr = substr($gpr, 0, strlen($gpr) - 2);
     }
     add_table_row('Tabella1', array($l[codice], $l[nome] . $gpr, nform($l[onorario])), array($oo_def_c, $oo_def, $oo_def_c));
 }
 // create content
 $OO_PAGE_STYLE = set_page_style($PAGE_STYLE);
 $OO_PAGE_HEADER = set_page_header("#DATA#\t\t\t\t" . EXPORT_SXW_TIT_OPER . "\t\t" . EXPORT_SXW_TIT_PG . ": #PAGINA#");
 $OO_PAGE_FOOTER = '';
 // set_page_footer('#DATA# #ORA#');
 $header_style = array(color => '#000000', size => '12pt', align => 'start', face => 'Verdana');
 //$footer_style = array(color => '#ffff00', size => '12pt', align => 'end', face => 'Verdana');
 $OO_HEADER_STYLE = set_header_style($header_style);
 $OO_FOOTER_STYLE = '';
 // set_footer_style($footer_style);
 $OO_TABLE_STYLES = gen_table_style();
 $OO_TEXT .= render_table('Tabella1');
 $OO_FONT_STYLES = gen_font_style();
 $url = make_sxw($filename);
 $PAGE_STYLE[height] = 29.7;
 //intestazione: info cliente
 // create table
 new_table(get_default_table('Tabella1', array(3, 18)));
 add_table_header('Tabella1', array(EXPORT_SXW_COD, EXPORT_SXW_DESCR), make_bold($oo_def_c));
 $where = implode(' AND ', $wh);
 $q = $DB->Execute("     SELECT * \r\n                                                        FROM INT_pratiche_tipo \r\n                                                        WHERE {$where}\r\n                                                        ORDER BY codice ASC");
 while ($l = $q->FetchRow()) {
     utf8_encode_array($l);
     if ($l[tat_imp_molt] == '') {
         $l[tat_imp_molt] = ' ';
     }
     if ($l[tat_nonimp_molt] == '') {
         $l[tat_nonimp_molt] = ' ';
     }
     add_table_row('Tabella1', array($l[codice], $l[ttp_desc]), array($oo_def_c, $oo_def, $oo_def_c));
 }
 // create content
 $OO_PAGE_STYLE = set_page_style($PAGE_STYLE);
 $OO_PAGE_HEADER = set_page_header("#DATA#\t\t\t\t" . EXPORT_SXW_TIT_CODT . "\t\t" . EXPORT_SXW_TIT_PG . ": #PAGINA#");
 $OO_PAGE_FOOTER = '';
 // set_page_footer('#DATA# #ORA#');
 $header_style = array(color => '#000000', size => '12pt', align => 'start', face => 'Verdana');
 //$footer_style = array(color => '#ffff00', size => '12pt', align => 'end', face => 'Verdana');
 $OO_HEADER_STYLE = set_header_style($header_style);
 $OO_FOOTER_STYLE = '';
 // set_footer_style($footer_style);
 $OO_TABLE_STYLES = gen_table_style();
 $OO_TEXT .= render_table('Tabella1');
 $OO_FONT_STYLES = gen_font_style();
 $url = make_sxw($filename);