* * and Joseph Engo * * Creates result boxes using templates * * Copyright (C) 2000, 2001 Dan Kuykendall * * -------------------------------------------------------------------------* * This library is part of phpGroupWare (http://www.phpgroupware.org) * * This library is free software; you can redistribute it and/or modify it * * under the terms of the GNU Lesser General Public License as published by * * the Free Software Foundation; either version 2.1 of the License, * * or any later version. * * This library is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * * along with this library; if not, write to the Free Software Foundation, * * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * \**************************************************************************/ /* $Id$ */ if (!$phpgw_info["flags"]["included_classes"]["portalbox"]){ $phpgw_info["flags"]["included_classes"]["portalbox"] = True; include($phpgw_info["server"]["include_root"]."/".$appname."/inc/class.portalbox.inc.php"); } 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="") { $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() { echo ''; echo ''; echo ''; echo '
'.$this->getvar("title").'
'; echo ''; for ($x = 0; $x < count($this->data); $x++) { echo ''; echo ''; echo ''; echo ''; } echo '
'.$this->data[$x][0].''.$this->data[$x][1].'
'; echo '
'; } }