forked from extern/egroupware
formatting
This commit is contained in:
parent
46f9c75630
commit
e436c522c1
@ -24,11 +24,10 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/* $Id$ */
|
||||
CreateObject('phpgwapi.portalbox');
|
||||
|
||||
CreateObject('phpgwapi.portalbox');
|
||||
|
||||
class linkbox extends portalbox {
|
||||
class linkbox extends portalbox
|
||||
{
|
||||
/*
|
||||
Set up the Object. You will notice, we have not reserved
|
||||
memory space for variables. In this circumstance it is not necessary.
|
||||
@ -43,7 +42,8 @@ class linkbox extends portalbox {
|
||||
the parent class, I simply call the parent constructor. Of course,
|
||||
if I then wanted to override any of the values, I could easily do so.
|
||||
*/
|
||||
function linkbox($param) {
|
||||
function linkbox($param)
|
||||
{
|
||||
$title = $param[0];
|
||||
$primary = $param[1];
|
||||
$secondary =$param[2];
|
||||
@ -53,14 +53,14 @@ class linkbox extends portalbox {
|
||||
$this->setvar("innerwidth",300);
|
||||
$this->setvar("width",300);
|
||||
}
|
||||
|
||||
/*
|
||||
This is the only method within the class. Quite simply, as you can see
|
||||
it draws the table(s), placing the required data in the appropriate place.
|
||||
*/
|
||||
function draw() {
|
||||
global $phpgw, $phpgw_info;
|
||||
|
||||
$p = new Template($phpgw->common->get_tpl_dir('home'));
|
||||
function draw()
|
||||
{
|
||||
$p = new Template($GLOBALS['phpgw']->common->get_tpl_dir('home'));
|
||||
$p->set_file(array('portal_main' => 'portal_main.tpl',
|
||||
'portal_linkbox_header' => 'portal_linkbox_header.tpl',
|
||||
'portal_linkbox' => 'portal_linkbox.tpl',
|
||||
@ -77,7 +77,8 @@ class linkbox extends portalbox {
|
||||
$p->set_var('header_background_image',$this->getvar('header_background_image'));
|
||||
$p->parse('output','portal_linkbox_header',True);
|
||||
|
||||
for ($x = 0; $x < count($this->data); $x++) {
|
||||
for ($x = 0; $x < count($this->data); $x++)
|
||||
{
|
||||
$p->set_var('link',$this->data[$x][1]);
|
||||
$p->set_var('text',$this->data[$x][0]);
|
||||
$p->parse('output','portal_linkbox',True);
|
||||
@ -85,4 +86,4 @@ class linkbox extends portalbox {
|
||||
$p->parse('output','portal_linkbox_footer',True);
|
||||
return $p->parse('out','portal_main');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,30 +24,34 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
CreateObject('phpgwapi.portalbox');
|
||||
CreateObject('phpgwapi.portalbox');
|
||||
|
||||
class resultbox extends portalbox {
|
||||
class resultbox extends portalbox
|
||||
{
|
||||
/*
|
||||
Set up the Object. You will notice, we have not reserved memory
|
||||
space for variables. In this circumstance it is not necessary.
|
||||
*/
|
||||
|
||||
//constructor
|
||||
function resultbox($title="", $primary="", $secondary="", $tertiary="") {
|
||||
function resultbox($title="", $primary="", $secondary="", $tertiary="")
|
||||
{
|
||||
$this->portalbox($title, $primary, $secondary, $tertiary);
|
||||
$this->setvar("outerwidth",400);
|
||||
$this->setvar("innerwidth",400);
|
||||
}
|
||||
|
||||
/*
|
||||
This is the only method within the class. Quite simply, as you can see
|
||||
it draws the table(s), placing the required data in the appropriate place.
|
||||
*/
|
||||
function draw() {
|
||||
function draw()
|
||||
{
|
||||
echo '<table border="'.$this->getvar("outerborderwidth").'" cellpadding="0" cellspacing="0" width="'.$this->getvar("outerwidth").'" bordercolor="'.$this->getvar("outerbordercolor").'" bgcolor="'.$this->getvar("titlebgcolor").'">';
|
||||
echo '<tr><td align="center">'.$this->getvar("title").'</td></tr>';
|
||||
echo '<tr><td>';
|
||||
echo '<table border="0" cellpadding="0" cellspacing="0" width="'.$this->getvar("innerwidth").'" bgcolor="'.$this->getvar("innerbgcolor").'">';
|
||||
for ($x = 0; $x < count($this->data); $x++) {
|
||||
for ($x = 0; $x < count($this->data); $x++)
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td width="50%">'.$this->data[$x][0].'</td>';
|
||||
echo '<td width="50%">'.$this->data[$x][1].'</td>';
|
||||
@ -57,4 +61,4 @@ class resultbox extends portalbox {
|
||||
echo '</td></tr>';
|
||||
echo '</table>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user