forked from extern/egroupware
formatting
This commit is contained in:
parent
8bc29b952f
commit
724d90feb7
@ -23,56 +23,59 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
class portalbox {
|
||||
|
||||
//Set up the Object, reserving memory space for variables
|
||||
|
||||
var $outerwidth;
|
||||
var $outerbordercolor;
|
||||
var $outerborderwidth;
|
||||
var $titlebgcolor;
|
||||
var $width;
|
||||
var $innerwidth;
|
||||
var $innerbgcolor;
|
||||
|
||||
// Textual variables
|
||||
var $title;
|
||||
|
||||
/*
|
||||
Use these functions to get and set the values of this
|
||||
object's variables. This is good OO practice, as it means
|
||||
that datatype checking can be completed and errors raised accordingly.
|
||||
*/
|
||||
function setvar($var,$value="") {
|
||||
if ($value=="") {
|
||||
global $$var;
|
||||
$value = $$var;
|
||||
}
|
||||
$this->$var = $value;
|
||||
// echo $var." = ".$this->$var."<br>\n";
|
||||
}
|
||||
|
||||
function getvar($var="") {
|
||||
if ($var=="" || !isset($this->$var)) {
|
||||
global $phpgw;
|
||||
echo 'Programming Error: '.$this->classname().'->getvar('.$var.')!<br>\n';
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
//echo "Var = ".$var."<br>\n";
|
||||
//echo $var." = ".$this->$var."<br>\n";
|
||||
return $this->$var;
|
||||
}
|
||||
|
||||
/*
|
||||
This is the constructor for the object.
|
||||
*/
|
||||
function portalbox($title="", $primary="", $secondary="", $tertiary="") {
|
||||
$this->setvar("title",$title);
|
||||
// echo "After SetVar Title = ".$this->getvar("title")."<br>\n";
|
||||
$this->setvar("outerborderwidth",1);
|
||||
$this->setvar("titlebgcolor",$primary);
|
||||
$this->setvar("innerbgcolor",$secondary);
|
||||
$this->setvar("outerbordercolor",$tertiary);
|
||||
}
|
||||
// Methods
|
||||
}
|
||||
class portalbox
|
||||
{
|
||||
//Set up the Object, reserving memory space for variables
|
||||
|
||||
var $outerwidth;
|
||||
var $outerbordercolor;
|
||||
var $outerborderwidth;
|
||||
var $titlebgcolor;
|
||||
var $width;
|
||||
var $innerwidth;
|
||||
var $innerbgcolor;
|
||||
|
||||
// Textual variables
|
||||
var $title;
|
||||
|
||||
/*
|
||||
Use these functions to get and set the values of this
|
||||
object's variables. This is good OO practice, as it means
|
||||
that datatype checking can be completed and errors raised accordingly.
|
||||
*/
|
||||
function setvar($var,$value='')
|
||||
{
|
||||
if ($value=='')
|
||||
{
|
||||
global $$var;
|
||||
$value = $$var;
|
||||
}
|
||||
$this->$var = $value;
|
||||
// echo $var." = ".$this->$var."<br>\n";
|
||||
}
|
||||
|
||||
function getvar($var='')
|
||||
{
|
||||
if ($var=='' || !isset($this->$var))
|
||||
{
|
||||
echo 'Programming Error: '.$this->classname().'->getvar('.$var.')!<br>\n';
|
||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||
}
|
||||
//echo "Var = ".$var."<br>\n";
|
||||
//echo $var." = ".$this->$var."<br>\n";
|
||||
return $this->$var;
|
||||
}
|
||||
|
||||
/*
|
||||
This is the constructor for the object.
|
||||
*/
|
||||
function portalbox($title='', $primary='', $secondary='', $tertiary='')
|
||||
{
|
||||
$this->setvar('title',$title);
|
||||
// echo 'After SetVar Title = '.$this->getvar('title')."<br>\n";
|
||||
$this->setvar('outerborderwidth',1);
|
||||
$this->setvar('titlebgcolor',$primary);
|
||||
$this->setvar('innerbgcolor',$secondary);
|
||||
$this->setvar('outerbordercolor',$tertiary);
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user