Location: PHPKode > scripts > Yet Another Pager > yet-another-pager/CYapBox.php
<?php
/**
 * CYapBox.php
 * Class to draw a simply message box.
 * @copyright CYapBox.php is part of Yap project {@link http://www.andrioli.com/en/yap.html} and it is LGPL
 * @author    Andrioli Darvin <darvin (inside) andrioli (dot) com>
 * @version   $Header: d:\cvs/classistd/yap/CYapBox.php,v 1.11 2008/03/10 12:15:46 darvin Exp $
 *
 */
/*
 * +-------------------------------------------------------------------------+
 * | Yap                                                                     |
 * +-------------------------------------------------------------------------+
 * | Copyright (c) 2003-2008 Andrioli Darvin                                 |
 * | Email         <darvin (inside) andrioli (dot) com>                      |
 * | Web           http://www.andrioli.com/en/yap.html                       |
 * | Download      http://www.phpclasses.org/browse.html/package/1391.html   |
 * |                                                                         |
 * +-------------------------------------------------------------------------+
 * | 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 of the      |
 * | License, or (at your option) 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 |
 * +-------------------------------------------------------------------------+
 */

/**
 *
 * @package CYap
 */
class CYapBox {


var $Text;
var $ForeColor;
var $BgColor;
function CYapBox($Text="",$ForeColor="#000000",$BgColor="#FFFFFF")
{
$this->Text=$Text;
$this->BgColor=$BgColor;
$this->ForeColor=$ForeColor;
}

/*
 * Funzione per il rendering del controllo
 */
function Show($Show=1)
{
// $string="<p bgcolor=".$this->BgColor.">".$this->Testo."</p>\n";
$string="<table border='0' align='center'><tr><td>
         <div style='color: #000000; background-color:#999999; padding: 2px; border: medium outset #000000; display: block;'>
         ".$this->Text."</div></td></tr></table>";
if($Show) { echo $string;}
return($string);
}

/*
 * Funzione per aggiunta sul testo interno al box
 */
function AddText($text)
{
$this->Text.=$text;
}

} // fine della classe

?>
Return current item: Yet Another Pager