<?
/*********************************************************/
class CStyle{
var $style_id;
var $name;
var $bgcol;
var $bgim;
var $bgrep;
var $bgpos;
var $font;
var $fsize;
var $fcol;
var $hsize;
var $hcol;
var $hbgcol;
var $hbgim;
var $hbgrep;
var $hbgpos;
var $docbgcol;
var $docbgim;
var $docbgrep;
var $docbgpos;
var $docborstyle;
var $docborw;
var $docborcol;
var $mmbgcol;
var $mmborstyle;
var $mmborw;
var $mmborcol;
var $mmfcol;
var $mmhcol;
var $smbgcol;
var $smborstyle;
var $smborw;
var $smborcol;
var $smfcol;
var $smhcol;
var $ah;
var $al;
var $av;
var $active;
var $order_by;
function CStyle($row=""){
$this->style_id = $row["style_id"];
$this->name = $row["name"];
$this->bgcol = $row["bgcol"];
$this->bgim = $row["bgim"];
$this->bgrep = $row["bgrep"];
$this->bgpos = $row["bgpos"];
$this->font = $row["font"];
$this->fsize = $row["fsize"];
$this->fcol = $row["fcol"];
$this->hsize = $row["hsize"];
$this->hcol = $row["hcol"];
$this->hbgcol = $row["hbgcol"];
$this->hbgim = $row["hbgim"];
$this->hbgrep = $row["hbgrep"];
$this->hbgpos = $row["hbgpos"];
$this->docbgcol = $row["docbgcol"];
$this->docbgim = $row["docbgim"];
$this->docbgrep = $row["docbgrep"];
$this->docbgpos = $row["docbgpos"];
$this->docborstyle = $row["docborstyle"];
$this->docborw = $row["docborw"];
$this->docborcol = $row["docborcol"];
$this->mmbgcol = $row["mmbgcol"];
$this->mmborstyle = $row["mmborstyle"];
$this->mmborw = $row["mmborw"];
$this->mmborcol = $row["mmborcol"];
$this->mmfcol = $row["mmfcol"];
$this->mmhcol = $row["mmhcol"];
$this->smbgcol = $row["smbgcol"];
$this->smborstyle = $row["smborstyle"];
$this->smborw = $row["smborw"];
$this->smborcol = $row["smborcol"];
$this->smfcol = $row["smfcol"];
$this->smhcol = $row["smhcol"];
$this->ah = $row["ah"];
$this->al = $row["al"];
$this->av = $row["av"];
$this->active = $row["active"];
$this->order_by = "style_id";
}
}
/*********************************************************/
class CStyleArray{
var $styles=array();
var $top=0;
var $count=0;
function get(){
if ($this->top <= $this->count){
$this->top++;
return $this->styles[$this->top-1];
}
else
return false;
}
function add($CStyle) {
$this->styles[$this->count] = $CStyle;
$this->count++;
return true;
}
function count() {
return ($this->count);
}
}
/*********************************************************/
class CStyleEngine {
function GetStyle($style_id){
$o_dataaccess = new CDataAccess();
return $o_dataaccess->GetStyle($style_id);
}
function GetActiveStyle(){
$o_dataaccess = new CDataAccess();
return $o_dataaccess->GetActiveStyle();
}
function UpdateStyle($CStyle){
$o_dataaccess = new CDataAccess();
return $o_dataaccess->UpdateStyle($CStyle);
}
}
?>