table css-row, on-close showWindow event, redirect parent on exit, open cash-drawer always on start printing, pole-display fixed bug.

This commit is contained in:
2025-12-03 14:28:39 +07:00
parent 8890739e45
commit 8864811189
6 changed files with 168 additions and 127 deletions
+40 -41
View File
@@ -4,7 +4,7 @@
Desc. : JS - Fonia Custom Class v3 Desc. : JS - Fonia Custom Class v3
Created By : Siau Pheng ([email protected]). Created By : Siau Pheng ([email protected]).
Created Date : June 19th, 2009. Created Date : June 19th, 2009.
Last Modified : September 21st, 2025. Last Modified : December 3rd, 2025.
(c) 2009 - 2025, 3FONIA Software; WWW.3FONIA.COM. (c) 2009 - 2025, 3FONIA Software; WWW.3FONIA.COM.
@@ -13,7 +13,7 @@
'use strict'; 'use strict';
var FoniaJS = { var FoniaJS = {
version: "3.0.0", version: "3.0.1",
APP_ID: 0, APP_ID: 0,
APP_SID: "", APP_SID: "",
WEB_HOST: "", WEB_HOST: "",
@@ -21,7 +21,7 @@ var FoniaJS = {
WEB_FULLPATH: "", WEB_FULLPATH: "",
WEB_MOBILE: 0, WEB_MOBILE: 0,
AUTH_LEVEL: 9, AUTH_LEVEL: 9,
User: {ID:null, UID:null, GID:0, Level:0}, User: {ID:null, UID:0, GID:0, Level:0},
phpversion: "", phpversion: "",
locales: [], locales: [],
deflocal: "", deflocal: "",
@@ -486,9 +486,10 @@ var FoniaJS = {
}); });
}).modal('show'); }).modal('show');
}, },
showWindow: function(id_wind, s_judul, s_isi, i_width, s_toolb, f_onload, b_scroll) {//oke showWindow: function(id_wind, s_judul, s_isi, i_width, s_toolb, f_onload, f_offload, b_scroll) {//oke
var t_width = '', t_toolb = '', t_scroll = (typeof b_scroll == 'boolean' && b_scroll == false) ? '' : 'modal-dialog-scrollable'; var t_width = '', t_toolb = '', t_scroll = (typeof b_scroll == 'boolean' && b_scroll == false) ? '' : 'modal-dialog-scrollable';
var f_oncall = (typeof f_onload == "function") ? f_onload : function(){}; var f_oncall = (typeof f_onload == "function") ? f_onload : function(){};
var f_offcall = (typeof f_offload == "function") ? f_offload : function(){};
if (typeof i_width == 'string') { t_width = 'modal-'+i_width; } else if (typeof i_width == 'string') { t_width = 'modal-'+i_width; } else
if (i_width <= 300) { t_width = 'modal-sm'; } else if (i_width <= 300) { t_width = 'modal-sm'; } else
if (i_width <= 400) { t_width = 'modal-400'; } else if (i_width <= 400) { t_width = 'modal-400'; } else
@@ -513,6 +514,7 @@ var FoniaJS = {
f_oncall(); f_oncall();
FoniaJS.FormDecorated(); FoniaJS.FormDecorated();
}).on('hidden.bs.modal', function(e){ }).on('hidden.bs.modal', function(e){
f_offcall();
$(this).remove(); $(this).remove();
}).modal('show'); }).modal('show');
return '#win'+id_wind; return '#win'+id_wind;
@@ -721,9 +723,6 @@ Request.JSONF = function(options){//oke
}; };
var make_option = function(ini){//oke var make_option = function(ini){//oke
var optIni = $('#'+ini.id); var optIni = $('#'+ini.id);
/*if (ini.css) {
optIni.prop('disabled', ini.css=='disabled');
}*/
if (!optIni) return; if (!optIni) return;
if (ini.avalue) { if (ini.avalue) {
optIni.empty(); optIni.empty();
@@ -764,6 +763,9 @@ Request.JSONF = function(options){//oke
}); });
strHead += '<th data-class-name="c">'+strAksi+'</th>'; strHead += '<th data-class-name="c">'+strAksi+'</th>';
aSortCol.push(null); aSortCol.push(null);
} else {
strHead += '<th data-class-name="hid">&nbsp;</th>';
aSortCol.push(null);
} }
strHead += '</tr></thead>'; strHead += '</tr></thead>';
@@ -791,11 +793,11 @@ Request.JSONF = function(options){//oke
if (keyi == 0) return; if (keyi == 0) return;
strBody += '<td>' + vali + '</td>'; strBody += '<td>' + vali + '</td>';
}); });
var _tbtn1 = "", _tbtn2 = "";
if (val[0].rowcss) {
_tbtn1 += '<span class="rowcss '+val[0].rowcss+'"></span>';
}
if (ini.option.length > 0) { if (ini.option.length > 0) {
var _tbtn1 = "", _tbtn2 = "";
if (val[0].rowcss) {
_tbtn1 += '<span class="rowcss '+val[0].rowcss+'"></span>';
}
if (val[0].button.length > 0) { if (val[0].button.length > 0) {
$.each(val[0].button, function(keyb, valb){ $.each(val[0].button, function(keyb, valb){
var _icon = (valb[0]=='fon-tabel-dt') ? 'pencil' : valb[0]; var _icon = (valb[0]=='fon-tabel-dt') ? 'pencil' : valb[0];
@@ -812,9 +814,8 @@ Request.JSONF = function(options){//oke
if (val[0].checkbox) { if (val[0].checkbox) {
_tbtn1 += '<div><input class="form-check-input" type="checkbox" id="'+ChkField+'_cbox_'+val[0].checkbox.field+'" value="'+val[0].checkbox.value+'"></div>'; _tbtn1 += '<div><input class="form-check-input" type="checkbox" id="'+ChkField+'_cbox_'+val[0].checkbox.field+'" value="'+val[0].checkbox.value+'"></div>';
} }
strBody += '<td class="">'+_tbtn1+_tbtn2+'</td>';
} }
strBody += '</tr>'; strBody += '<td class="">'+_tbtn1+_tbtn2+'</td></tr>';
}); });
strBody += '</tbody>'; strBody += '</tbody>';
@@ -850,11 +851,11 @@ Request.JSONF = function(options){//oke
$.each(jsono.data, function(key, val){ $.each(jsono.data, function(key, val){
var optval = val[0]; jsono.data[key].shift(); var optval = val[0]; jsono.data[key].shift();
var _tbtn1 = "", _tbtn2 = "";
if (optval.rowcss) {
_tbtn1 += '<span class="rowcss '+optval.rowcss+'"></span>';
}
if (ini.option.length > 0) { if (ini.option.length > 0) {
var _tbtn1 = "", _tbtn2 = "";
if (optval.rowcss) {
_tbtn1 += '<span class="rowcss '+optval.rowcss+'"></span>';
}
if (optval.button.length > 0) { if (optval.button.length > 0) {
$.each(optval.button, function(keyb, valb){ $.each(optval.button, function(keyb, valb){
var _icon = (valb[0]=='fon-tabel-dt') ? 'pencil' : valb[0]; var _icon = (valb[0]=='fon-tabel-dt') ? 'pencil' : valb[0];
@@ -871,8 +872,8 @@ Request.JSONF = function(options){//oke
if (optval.checkbox) { if (optval.checkbox) {
_tbtn1 += '<div><input class="form-check-input" type="checkbox" id="'+ChkField+'_cbox_'+optval.checkbox.field+'" value="'+optval.checkbox.value+'"></div>'; _tbtn1 += '<div><input class="form-check-input" type="checkbox" id="'+ChkField+'_cbox_'+optval.checkbox.field+'" value="'+optval.checkbox.value+'"></div>';
} }
jsono.data[key].push(_tbtn1+_tbtn2);
} }
jsono.data[key].push(_tbtn1+_tbtn2);
}); });
return JSON.stringify(jsono); return JSON.stringify(jsono);
} }
@@ -988,29 +989,27 @@ Request.JSONF = function(options){//oke
} }
}); });
} }
//if (ini.config.live){ $('#'+ini.id+'Tabel tbody').on('click', 'td.dtr-control', function(){
$('#'+ini.id+'Tabel tbody').on('click', 'td.dtr-control', function(){ var tr = $(this).closest('tr');
var tr = $(this).closest('tr'); var row = otabel.row(tr);
var row = otabel.row(tr); if (row.child.isShown()){
if (row.child.isShown()){ row.child.hide();
row.child.hide(); tr.removeClass('dt-hasChild parent');
tr.removeClass('dt-hasChild parent'); }else{
}else{ var ind = 0;
var ind = 0; var tampil = '<ul class="list-unstyled">';
var tampil = '<ul class="list-unstyled">'; api.columns().every(function() {
api.columns().every(function() { var kol = this.header();
var kol = this.header(); if (kol.className.indexOf('dtr-hidden') != -1){
if (kol.className.indexOf('dtr-hidden') != -1){ tampil += '<li class="py-1"><span class="d-inline-block" style="min-width:100px;">' + kol.textContent + '</span><span class="text-break">' + row.data()[ind] + '</span></li>';
tampil += '<li class="py-1"><span class="d-inline-block" style="min-width:100px;">' + kol.textContent + '</span><span class="text-break">' + row.data()[ind] + '</span></li>'; }
} ind++;
ind++; })
}) tampil += '</ul>';
tampil += '</ul>'; row.child(tampil).show();
row.child(tampil).show(); tr.addClass('dt-hasChild parent');
tr.addClass('dt-hasChild parent'); }
} });
});
//}
} }
var otabel = $('#'+ini.id+'Tabel').DataTable(opsi); var otabel = $('#'+ini.id+'Tabel').DataTable(opsi);
}; };
+93
View File
@@ -0,0 +1,93 @@
/*******************************************************************
Module : /assets/js/pole-display.js
Desc. : JS Class Tampil Data di Pole Display POS
Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : October 12th, 2025.
(c) 2025, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var cPOLEDISPLAY = function(port, options){
var _cd_port = '';
var _cd_pole = '';
var _options = {
rx: { start: '\x02', end: '\x0D', width: null },
baudRate: 9600,
dataBits: 8,
stopBits: 1,
parity: 'NONE',
flowControl: 'NONE'
};
this.construct = function (port, options){//oke
$.extend(_options, options);
_cd_port = port;
};
this.Open = function (){
if (_cd_pole === '') {
qz.serial.openPort(_cd_port, _options).then(() => {
_cd_pole = _cd_port;
this.cd_Error(_cd_port+' opened');
}).then(() => {
qz.serial.sendData(_cd_pole, {type:'HEX',data:'x1Bx40'}, _options).catch(this.cd_Error);
}).catch(this.cd_Error);
}
};
this.Close = function (){
qz.serial.closePort(_cd_port).then(() => {
_cd_pole = '';
this.cd_Error(_cd_port+' closed');
}).catch(this.cd_Error);
};
this.Send = function (txt){
if (_cd_pole === '') return false;
var ascii_to_hexa = function(str) {
var arr1 = [];
for (var n = 0, l = str.length; n < l; n++) {
var hex = Number(str.charCodeAt(n)).toString(16);
if (hex.length==1) hex = '0' + hex;
arr1.push(hex.toUpperCase());
}
return 'x' + arr1.join('x');
};
var _txt = txt;
if (Array.isArray(txt)) {
_txt = '';
txt.forEach((ele) => {
_txt += this.cd_Text(ele['t'], ele['a']);
});
}
qz.serial.sendData(_cd_pole, {type:'HEX',data:'x10C'+ascii_to_hexa(_txt)}, _options).catch(this.cd_Error);
};
this.cd_Text = function (text, align){
const totWidth = 20;
const txtLength = text.length;
if (txtLength >= totWidth) {
return text.substring(0, totWidth);
}
const padding = totWidth - txtLength;
var lPadding = 0;
var rPadding = padding;
if (align === null) align = 'L';
if (align == 'C'){
lPadding = Math.floor(padding / 2);
rPadding = Math.ceil(padding / 2);
} else if (align == 'R'){
lPadding = padding;
rPadding = 0;
}
return " ".repeat(lPadding) + text + " ".repeat(rPadding);
};
this.cd_Error = function (err){//oke
console.error(err);
};
this.construct(port, options);
};
+19 -65
View File
@@ -4,9 +4,9 @@
Desc. : JS Class Printer & Printer POS Desc. : JS Class Printer & Printer POS
Created By : Siau Pheng (siaupheng@3fonia.com). Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : May 27th, 2007. Created Date : May 27th, 2007.
Last Modified : January 26th, 2021. Last Modified : December 3rd, 2025.
(c) 2008 - 2021, 3FONIA Software; WWW.3FONIA.COM. (c) 2007 - 2025, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/ *******************************************************************/
@@ -92,51 +92,23 @@ var cPRINTER = function(url, options){
this.construct(url, options); this.construct(url, options);
}; };
/*
showPreview: function() {
toolbar: true,
toolbarPosition: "top",
toolbarHeight: 35,
toolbarMenu: "PP,_,PS,PN,PB",
toolbarOnload: function() {
$("butPPrint").addEvent("click", function() {
if (this.winPreview) {
this.winPreview.close();
}
window.print();
}.bind(this));
$("butPNormal").addEvent("click", function() {
this.winPreview.options.zoomfont = 100;
$("winPreview_content").setStyle("font-size", this.winPreview.options.zoomfont + "%");
}.bind(this));
$("butPSmall").addEvent("click", function() {
this.winPreview.options.zoomfont -= 10;
$("winPreview_content").setStyle("font-size", this.winPreview.options.zoomfont + "%");
}.bind(this));
$("butPBig").addEvent("click", function() {
this.winPreview.options.zoomfont += 10;
$("winPreview_content").setStyle("font-size", this.winPreview.options.zoomfont + "%");
}.bind(this));
$("winPreview_content").setStyle("font-size", this.options.zoom + "%");
}.bind(this)
});
},
});*/
var cPRINTERPOS = function(url, options) { var cPRINTERPOS = function(url, options) {
var b_default = false; var b_default = false;
var _options = { var _options = {
'url': '', 'url': '',
'param': [], 'param': [],
'printer': null 'printer': null,
'cut_paper': "\x1D\x56\x41",
'open_draw': "\x1B\x70\x30\x19\x19",
'chr_norm': "\x1B\x21\x01",
'chr_bold': "\x1B\x21\x10",
'chr_sbold': "\x1B\x21\x31",
'chr_uline': "\x1B\x21\x80"
}; };
this.construct = function(url, options) { this.construct = function(url, options) {
$.extend(_options, options); $.extend(_options, options);
_options.url = url; _options.url = url;
if (FoniaJS._def_printer) _options.printer = FoniaJS._def_printer; if (FoniaJS._def_printer) _options.printer = FoniaJS._def_printer;
/*if ($('#configPrinter')) {
_options.printer = $('#configPrinter').html();
}*/
}; };
this.detectPrinter = function() { this.detectPrinter = function() {
if (!qz.websocket.isActive()) { if (!qz.websocket.isActive()) {
@@ -170,9 +142,6 @@ var cPRINTERPOS = function(url, options) {
if (data.name != undefined) { if (data.name != undefined) {
nama_p = data.name; nama_p = data.name;
} }
/*if ($('#configPrinter')) {
$('#configPrinter').html(nama_p);
}*/
parent._options.param.push('Printer='+nama_p); parent._options.param.push('Printer='+nama_p);
return parent.do_print(nama_p, parent._options.url, parent._options.param); return parent.do_print(nama_p, parent._options.url, parent._options.param);
}, function(data) { }, function(data) {
@@ -207,13 +176,6 @@ var cPRINTERPOS = function(url, options) {
}).send(); }).send();
}; };
this.gen_escp = function(adata) { this.gen_escp = function(adata) {
var cut_paper = "\x1D\x56\x41";
var open_draw = "\x1B\x70\x30\x19\x19";
var nv_image = "\x1D\x28\x4C\x06\x00\x30\x45\x30\x30\x01\x01";
var chr_norm = "\x1B\x21\x01";
var chr_bold = "\x1B\x21\x10";
var chr_sbold = "\x1B\x21\x31";
var chr_uline = "\x1B\x21\x80";
var ohead = []; var ohead = [];
var osheet = [], ocetak = []; var osheet = [], ocetak = [];
ohead.push("\x1B\x40"); ohead.push("\x1B\x40");
@@ -223,17 +185,13 @@ var cPRINTERPOS = function(url, options) {
ohead.push("\x1B\x32"); ohead.push("\x1B\x32");
} }
if (parseInt(adata.config.fontsize) == 2) { if (parseInt(adata.config.fontsize) == 2) {
chr_norm = "\x1B\x21\x02"; _options.chr_norm = "\x1B\x21\x02";
}
if (adata.config.nvlogo) {
ohead.push((this.options.nv_cmd?this.options.nv_cmd:nv_image));
ohead.push(chr_norm);
} }
if (adata.header.length > 0) { if (adata.header.length > 0) {
for (i = 0; i < adata.header.length; i++) { for (i = 0; i < adata.header.length; i++) {
if (i==0 && !adata.config.nvlogo && adata.config.logo==null) ohead.push(chr_bold); if (i==0 && adata.config.logo==null) ohead.push(_options.chr_bold);
ohead.push(adata.header[i] + "\x0A"); ohead.push(adata.header[i] + "\x0A");
if (i==0 && !adata.config.nvlogo && adata.config.logo==null) ohead.push(chr_norm); if (i==0 && adata.config.logo==null) ohead.push(_options.chr_norm);
} }
} }
for (s = 0; s < adata.content.length; s++) { for (s = 0; s < adata.content.length; s++) {
@@ -241,28 +199,24 @@ var cPRINTERPOS = function(url, options) {
osheet = ohead.slice(0); osheet = ohead.slice(0);
for (i = 0; i < adata.content[s].length; i++) { for (i = 0; i < adata.content[s].length; i++) {
var tmp_cont = adata.content[s][i]; var tmp_cont = adata.content[s][i];
tmp_cont = tmp_cont.replace('_SBOLD_', chr_sbold) tmp_cont = tmp_cont.replace('_SBOLD_', _options.chr_sbold)
.replace('_BOLD_', chr_bold) .replace('_BOLD_', _options.chr_bold)
.replace('_NORM_', chr_norm) .replace('_NORM_', _options.chr_norm)
.replace('_ULINE_', chr_uline); .replace('_ULINE_', _options.chr_uline);
osheet.push(tmp_cont + "\x0A"); osheet.push(tmp_cont + "\x0A");
} }
if (adata.config.cutpaper) { if (adata.config.cutpaper) {
osheet.push(cut_paper + "\x0A"); osheet.push(_options.cut_paper + "\x0A");
} }
//osheet.push("\x1B\x65\x02");//feed up 2row
ocetak = ocetak.concat(osheet); ocetak = ocetak.concat(osheet);
} }
var notaout = []; var notaout = [];
if (adata.config.opendraw && adata.config.opendrawbegin) { if (adata.config.opendraw) {
notaout.push(open_draw); notaout.push(_options.open_draw);
} }
for (i = 0; i < adata.config.times; i++) { for (i = 0; i < adata.config.times; i++) {
notaout = notaout.concat(ocetak); notaout = notaout.concat(ocetak);
} }
if (adata.config.opendraw && adata.config.opendrawbegin == false) {
notaout.push(open_draw);
}
return notaout; return notaout;
}; };
this.gen_epl = function(adata) { this.gen_epl = function(adata) {
+8 -6
View File
@@ -6,7 +6,7 @@
Desc. : v3 - HTML5 Page Generator (jQuery & Bootstrap) Desc. : v3 - HTML5 Page Generator (jQuery & Bootstrap)
Created By : Siau Pheng (siaupheng@3fonia.com). Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : January 10th, 2008. Created Date : January 10th, 2008.
Last Modified : September 21st, 2025. Last Modified : October 3rd, 2025.
(c) 2008 - 2025, 3FONIA Software; WWW.3FONIA.COM. (c) 2008 - 2025, 3FONIA Software; WWW.3FONIA.COM.
@@ -116,13 +116,15 @@ final class App {
$href1 = $this->apps['WEB_PATH'].'../'; $href1 = $this->apps['WEB_PATH'].'../';
$href2 = ""; $href2 = "";
} else { } else {
$_host = str_replace(['http://','https://'], "", $this->apps['PARENT_SITE']); $_host = (isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : $this->apps['PARENT_SITE']);
$_prot = "//"; $_host = str_replace(['http://','https://'], "", $_host);
if ($this->apps['PARENT_SUB']==true) { if ($this->apps['PARENT_SUB']==true) {
$href1 = $_prot; $_subs = explode('.', $_host);
$href2 = ".". $_host; if (count($_subs) > 2) array_shift($_subs);
$href1 = "//";
$href2 = "." . implode('.', $_subs);
} else { } else {
$href1 = $_prot . $_host .'/'; $href1 = "//" . $_host . '/';
$href2 = ""; $href2 = "";
} }
} }
+7 -14
View File
@@ -6,9 +6,9 @@
Desc. : v4 - Class cetak POS Desc. : v4 - Class cetak POS
Created By : Siau Pheng (siaupheng@3fonia.com). Created By : Siau Pheng (siaupheng@3fonia.com).
Created Date : June 15th, 2008. Created Date : June 15th, 2008.
Last Modified : November 1st, 2023. Last Modified : December 3rd, 2025.
(c) 2008 - 2023, 3FONIA Software; WWW.3FONIA.COM. (c) 2008 - 2025, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/ *******************************************************************/
@@ -17,7 +17,7 @@ declare(strict_types=1);
namespace siaupheng\fonia3\Printer; namespace siaupheng\fonia3\Printer;
/* VERSI BARU DENGAN MULTI SHEET */ /* VERSI BARU DENGAN MULTI SHEET */
class PrintPOS {//up: 20180108 class PrintPOS {//up: 20251203
private $_header = []; private $_header = [];
private $_avalue = []; private $_avalue = [];
private $_astyle = []; private $_astyle = [];
@@ -25,18 +25,15 @@ class PrintPOS {//up: 20180108
private $_maxchr = 40; private $_maxchr = 40;
private $_config = [ private $_config = [
'fontsize' => 1, 'fontsize' => 1,
'nvlogo' => false,
'opendraw' => false, 'opendraw' => false,
'opendrawbegin' => true,
'cutpaper' => false, 'cutpaper' => false,
'logo' => null ]; 'logo' => null ];
public function __construct() { public function __construct() {
} }
public function set_opendrawer($bbegin = true) { public function set_opendrawer() {
$this->_config['opendraw'] = true; $this->_config['opendraw'] = true;
$this->_config['opendrawbegin'] = $bbegin;
} }
public function set_cutpaper() { public function set_cutpaper() {
@@ -51,9 +48,7 @@ class PrintPOS {//up: 20180108
if ($nsize > 0) $this->_config['fontsize'] = $nsize; if ($nsize > 0) $this->_config['fontsize'] = $nsize;
} }
public function set_printnv_logo() {//up: 2015-03-23 public function set_printnv_logo() {}//delete
$this->_config['nvlogo'] = true;
}
public function set_header_logo($logo_file = "") {//up: 2019-01-08 public function set_header_logo($logo_file = "") {//up: 2019-01-08
if ($logo_file=="") return; if ($logo_file=="") return;
@@ -62,15 +57,13 @@ class PrintPOS {//up: 20180108
} }
} }
public function add_header($nvlogo = false, $extra = array()) {//up: 2018-12-25 public function add_header() {//up: 2025-12-03
$this->_config['nvlogo'] = $nvlogo; $extra = func_get_args();
if ($nvlogo==false && $this->_config['logo']==null) $this->_header[] = $_SESSION['__WEB_APP']['REG_NAME'];
if (count($extra) > 0) { if (count($extra) > 0) {
foreach ($extra as $_val) { foreach ($extra as $_val) {
$this->_header[] = $_val; $this->_header[] = $_val;
} }
} }
$this->_header[] = $_SESSION['__WEB_APP']['REG_CITY'];
} }
public function add_sheet() {//up: 20170321 public function add_sheet() {//up: 20170321
+1 -1
View File
@@ -139,7 +139,7 @@ final class Table {
$this->__bnobutton = true; $this->__bnobutton = true;
} }
public function add_field($tfield = "", $theader = "", $tstyle = "left", $tformat = "", $tfooter = "", $totype = "") { public function add_field($tfield = "", $theader = "", $tstyle = "l", $tformat = "", $tfooter = "", $totype = "") {
$this->__aheader[] = $theader; $this->__aheader[] = $theader;
$this->__afield[] = $tfield; $this->__afield[] = $tfield;
$this->__astyle[] = $tstyle; $this->__astyle[] = $tstyle;