, ICQ UIN 91792005';
var $Styles;
var $StylesHTML;
var $Tables;
var $TablesHTML;
var $HTMLTable;
var $active_styles = array (
'font_size' => 'on',
'font_family' => 'on',
'font_color' => 'on',
'font_bold' => 'on',
'font_italic' => 'on',
'font_underline' => 'on',
'text_align' => 'on',
'text_valign' => 'on',
'bg_color' => 'on',
'column_width' => 'on',
'row_height' => 'on',
// 'border_top' => 'on',
// 'border_right' => 'on',
// 'border_bottom' => 'on',
// 'border_left' => 'on',
'number_format' => 'on'
);
var $default_styles = array (
'table_border' => 1,
'table_bordercolor' => "#C0C0C0",
'table_cellspacing' => 0,
'table_cellpadding' => 0,
'table_style' => "border-collapse:collapse;",
'font_size' => '10',
'font_family' => 'Arial Cyr',
'font_color' => '#000000',
'font_bold' => '',
'font_italic' => '',
'font_underline' => '',
'text_align' => '',
'text_valign' => '',
'bg_color' => '',
'column_width' => 64,
'row_height' => 15,
);
#===============================================================================================
# CExcelXMLTableShowHTML
#===============================================================================================
function CExcelXMLTableShowHTML() {
$this->HTMLTable = new CExcelXMLHTMLTable();
}
#===============================================================================================
# SET ACTIVE STYLES
#===============================================================================================
function setActiveStyles($active_styles) {
foreach($active_styles as $key=>$property) {
$this->active_styles[$key] = $property;
}
}
#===============================================================================================
# SET DEFAULT STYLES
#===============================================================================================
function setDefaultStyles($default_styles) {
foreach($default_styles as $key=>$property) {
$this->default_styles[$key] = $property;
}
}
#===============================================================================================
# SET STYLES
#===============================================================================================
function setStyles($styles) {
$this->Styles = $styles;
}
#===============================================================================================
# SET TABLES
#===============================================================================================
function setTables($tables) {
$this->Tables = $tables;
}
#===============================================================================================
# GEN STYLE SHEET
#===============================================================================================
function genStyleSheet($styles) {
$this->Styles = $styles;
$active = $this->active_styles;
$default = $this->default_styles;
$sHTML.= "\n\n\n\n";
$this->StylesHTML = $sHTML;
}
#===============================================================================================
# CREATE STYLE
#===============================================================================================
function createStyle($style) {
$sBody='';
if (strval($style['font_size'])!='')
$sBody.= " font-size: ".$style['font_size']."px;\n";
if (strval($style['font_family'])!='')
$sBody.= " font-family: ".$style['font_family'].";\n";
if (strval($style['font_color'])!='')
$sBody.= " color: ".$style['font_color'].";\n";
if (strval($style['font_bold'])=='1')
$sBody.= " font-weight: bold;\n";
if (strval($style['font_italic'])!='')
$sBody.= " font-style: italic;\n";
if (strval($style['font_underline'])!='')
$sBody.= " text-decoration: underline;\n";
if (strval($style['text_align'])!='')
$sBody.= " text-align: ".$style['text_align'].";\n";
if (strval($style['text_valign'])!='')
$sBody.= " vertical-align: ".$style['text_valign'].";\n";
if (strval($style['background'])!='')
$sBody.= " background: ".$style['background'].";\n";
if (strval($style['border_top'])!='')
$sBody.= " border-top: ".$style['border_top']."pt solid windowtext;\n";
if (strval($style['border_right'])!='')
$sBody.= " border-right: ".$style['border_right']."pt solid windowtext;\n";
if (strval($style['border_bottom'])!='')
$sBody.= " border-bottom: ".$style['border_bottom']."pt solid windowtext;\n";
if (strval($style['border_left'])!='')
$sBody.= " border-left: ".$style['border_left']."pt solid windowtext;\n";
return $sBody;
}
#===============================================================================================
# SHOW HTML STYLE SHEET
#===============================================================================================
function showHTMLStyleSheet($styles) {
$this->Styles = $styles;
$this->genStyleSheet($styles);
echo $this->StylesHTML;
}
#===============================================================================================
# GEN EXCEL TABLE
#===============================================================================================
function genExcelTable($tables) {
}
#===============================================================================================
# SHOW HTML EXCEL TABLE
#===============================================================================================
function showHTMLExcelTable() {
// $this->Tables = $tables;
$td_properties = array(
'colspan' => 'Colspan',
'rowspan' => 'Rowspan',
// 'class' => 'StyleID',
'content' => 'Content',
);
$tr_properties = array(
'height' => 'Height',
);
$this->HTMLTable->setTDProperties($td_properties);
$this->HTMLTable->setTRProperties($tr_properties);
$this->HTMLTable->Styles = $this->Styles;
$this->HTMLTable->active_styles = $this->active_styles;
$this->HTMLTable->default_styles = $this->default_styles;
echo "\n";
echo "\n";
echo "\n";
for ($i=0; $iTables); $i++) {
if ($this->Tables[$i]['Table']['Rows']) {
echo "".$this->Tables[$i]['ListName']."";
$this->HTMLTable->Table = $this->Tables[$i]['Table'];
$this->HTMLTable->setRangeRows($this->Tables[$i]['Table']['ExpandedRowCount']);
$this->HTMLTable->setRangeCols($this->Tables[$i]['Table']['ExpandedColumnCount']);
$this->HTMLTable->showTable();
echo "
\n";
}
}
echo "\n";
echo "\n";
echo "\n\n\n";
}
#===============================================================================================
# / class
#===============================================================================================
}
?>