YAP  2.5
 All Data Structures Namespaces Files Functions Variables
CYapBox.php
Go to the documentation of this file.
1 <?php
9 /*
10  * +-------------------------------------------------------------------------+
11  * | Yap, Version 2.5.0 |
12  * +-------------------------------------------------------------------------+
13  * | Copyright (c) 2003-2013 Andrioli Darvin |
14  * | Email <darvin (inside) andrioli (dot) com> |
15  * | Web http://www.andrioli.com/en/yap.html |
16  * | Download http://www.phpclasses.org/browse.html/package/1391.html |
17  * | |
18  * +-------------------------------------------------------------------------+
19  * | This library is free software; you can redistribute it and/or modify |
20  * | it under the terms of the GNU Lesser General Public License as |
21  * | published by the Free Software Foundation; either version 2 of the |
22  * | License, or (at your option) any later version. |
23  * | |
24  * | This library is distributed in the hope that it will be useful, but |
25  * | WITHOUT ANY WARRANTY; without even the implied warranty of |
26  * | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
27  * | Lesser General Public License for more details. |
28  * | |
29  * | You should have received a copy of the GNU Lesser General Public |
30  * | License along with this library; if not, write to the Free Software |
31  * | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
32  * +-------------------------------------------------------------------------+
33  */
34 
39 class CYapBox {
40 
41 
42 var $Text;
45 function CYapBox($Text="",$ForeColor="#000000",$BgColor="#FFFFFF")
46 {
47 $this->Text=$Text;
48 $this->BgColor=$BgColor;
49 $this->ForeColor=$ForeColor;
50 }
51 
52 /*
53  * Funzione per il rendering del controllo
54  */
55 function Show($Show=1)
56 {
57 // $string="<p bgcolor=".$this->BgColor.">".$this->Testo."</p>\n";
58 $string="<table border='0' align='center'><tr><td>
59  <div style='color: #000000; background-color:#999999; padding: 2px; border: medium outset #000000; display: block;'>
60  ".$this->Text."</div></td></tr></table>";
61 if($Show) { echo $string;}
62 return($string);
63 }
64 
65 /*
66  * Funzione per aggiunta sul testo interno al box
67  */
68 function AddText($text)
69 {
70 $this->Text.=$text;
71 }
72 
73 } // fine della classe
74 
75 ?>