[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/phpgwapi/inc/ -> class.resultbox.inc.php (source)

   1  <?php
   2    /**************************************************************************\
   3    * eGroupWare API - Result box                                              *
   4    * This file written by Dan Kuykendall <seek3r@phpgroupware.org>            *
   5    * and Joseph Engo <jengo@phpgroupware.org>                                 *
   6    * Creates result boxes using templates                                     *
   7    * Copyright (C) 2000, 2001 Dan Kuykendall                                  *
   8    * -------------------------------------------------------------------------*
   9    * This library is part of the eGroupWare API                               *
  10    * http://www.egroupware.org/api                                            * 
  11    * ------------------------------------------------------------------------ *
  12    * This library is free software; you can redistribute it and/or modify it  *
  13    * under the terms of the GNU Lesser General Public License as published by *
  14    * the Free Software Foundation; either version 2.1 of the License,         *
  15    * or any later version.                                                    *
  16    * This library is distributed in the hope that it will be useful, but      *
  17    * WITHOUT ANY WARRANTY; without even the implied warranty of               *
  18    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     *
  19    * See the GNU Lesser General Public License for more details.              *
  20    * You should have received a copy of the GNU Lesser General Public License *
  21    * along with this library; if not, write to the Free Software Foundation,  *
  22    * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA            *
  23    \**************************************************************************/
  24  
  25    /* $Id: class.resultbox.inc.php 15134 2004-05-05 12:06:13Z reinerj $ */
  26  
  27      CreateObject('phpgwapi.portalbox');
  28  
  29      class resultbox extends portalbox
  30      {
  31          /* 
  32           Set up the Object. You will notice, we have not reserved memory
  33           space for variables. In this circumstance it is not necessary.
  34          */
  35          //constructor 
  36  		function resultbox($title='', $primary='', $secondary='', $tertiary='')
  37          {
  38              $this->portalbox($title, $primary, $secondary, $tertiary);
  39              $this->setvar('outerwidth',400);
  40              $this->setvar('innerwidth',400);
  41          }
  42  
  43          /*
  44           This is the only method within the class. Quite simply, as you can see
  45           it draws the table(s), placing the required data in the appropriate place.
  46          */
  47  		function draw()
  48          {
  49              echo '<table border="'.$this->getvar('outerborderwidth')
  50                  . '" cellpadding="0" cellspacing="0" width="' . $this->getvar('outerwidth')
  51                  . '" bordercolor="' . $this->getvar('outerbordercolor')
  52                  . '" bgcolor="' . $this->getvar('titlebgcolor') . '">';
  53              echo '<tr><td align="center">'.$this->getvar("title") . '</td></tr>';
  54              echo '<tr><td>';
  55              echo '<table border="0" cellpadding="0" cellspacing="0" width="'.$this->getvar('innerwidth')
  56                  . '" bgcolor="' . $this->getvar('innerbgcolor') . '">';
  57              for ($x = 0; $x < count($this->data); $x++)
  58              {
  59                  echo '<tr>';
  60                  echo '<td width="50%">' . $this->data[$x][0] . '</td>';
  61                  echo '<td width="50%">' . $this->data[$x][1] . '</td>';
  62                  echo '</tr>';
  63              }
  64              echo '</table>';
  65              echo '</td></tr>';
  66              echo '</table>';
  67          }
  68      }


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7