Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 6 |
CRAP | |
0.00% |
0 / 16 |
| TBoxIframe | |
0.00% |
0 / 1 |
|
0.00% |
0 / 6 |
72 | |
0.00% |
0 / 16 |
| __construct | |
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 7 |
|||
| setUrl | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getUrl | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| setTitle | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
| getTitle | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| show | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
|||
| 1 | <?php |
| 2 | /* |
| 3 | * Formdin Framework |
| 4 | * Copyright (C) 2012 Ministério do Planejamento |
| 5 | * Criado por Luís Eugênio Barbosa |
| 6 | * Essa versão é um Fork https://github.com/bjverde/formDin |
| 7 | * |
| 8 | * ---------------------------------------------------------------------------- |
| 9 | * This file is part of Formdin Framework. |
| 10 | * |
| 11 | * Formdin Framework is free software; you can redistribute it and/or |
| 12 | * modify it under the terms of the GNU Lesser General Public License version 3 |
| 13 | * as published by the Free Software Foundation. |
| 14 | * |
| 15 | * This program is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU Lesser General Public License version 3 |
| 21 | * along with this program; if not, see <http://www.gnu.org/licenses/> |
| 22 | * or write to the Free Software Foundation, Inc., 51 Franklin Street, |
| 23 | * Fifth Floor, Boston, MA 02110-1301, USA. |
| 24 | * ---------------------------------------------------------------------------- |
| 25 | * Este arquivo é parte do Framework Formdin. |
| 26 | * |
| 27 | * O Framework Formdin é um software livre; você pode redistribuí-lo e/ou |
| 28 | * modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação |
| 29 | * do Software Livre (FSF). |
| 30 | * |
| 31 | * Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA |
| 32 | * GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou |
| 33 | * APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português |
| 34 | * para maiores detalhes. |
| 35 | * |
| 36 | * Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título |
| 37 | * "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> |
| 38 | * ou escreva para a Fundação do Software Livre (FSF) Inc., |
| 39 | * 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. |
| 40 | */ |
| 41 | |
| 42 | class TBoxIframe extends Tbox |
| 43 | { |
| 44 | private $strUrl; |
| 45 | private $strTitle; |
| 46 | public function __construct(string $strTitle=null |
| 47 | ,string $strUrl |
| 48 | ,string $strName=null,$strHeight=null,$strWidth=null,$boolFlat=null) |
| 49 | { |
| 50 | $strHeight = is_null($strHeight) ? 600 : $strHeight; |
| 51 | $strWidth = is_null($strWidth) ? 800 : $strWidth; |
| 52 | parent::__construct($strName,$strWidth,$strHeight,$boolFlat); |
| 53 | $this->divBody->setCss('overflow','hidden'); |
| 54 | $this->setUrl($strUrl); |
| 55 | $this->setTitle($strTitle); |
| 56 | } |
| 57 | public function setUrl($newUrl=null) |
| 58 | { |
| 59 | $this->strUrl = $newUrl; |
| 60 | } |
| 61 | public function getUrl() |
| 62 | { |
| 63 | return $this->strUrl; |
| 64 | } |
| 65 | public function setTitle($newTitle=null) |
| 66 | { |
| 67 | $this->strTitle = $newTitle; |
| 68 | } |
| 69 | public function getTitle() |
| 70 | { |
| 71 | return $this->strTitle; |
| 72 | } |
| 73 | public function show($print=true,$flat=false) |
| 74 | { |
| 75 | $this->divBody->add('<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td height="*" width="99%" style="font-family:arial,helvetica, geneva, sans-serif;font-size:18px;height:18px;text-align:center;color:#256391;font-weight:bold;vertical-align:middle;" >'.$this->getTitle().'</td><td width="*"><img style="float:right;cursor:pointer;" onClick="fwFecharFormulario(\''.$this->getId().'\',true);" src="'.$this->getBase().'imagens/fwbtnclosered.jpg"></td></tr><tr><td colspan="2" height="99%" style="overflow:auto;"> |
| 76 | <iframe id="iframe_'.$this->getId().'" style="width:100%;height:99%;" frameborder="0" marginheight="0" marginwidth="0" src="'.$this->getUrl().'"></iframe></td></tr></table>'); |
| 77 | return parent::show($print,$flat); |
| 78 | } |
| 79 | } |
| 80 | //$box = new TBoxIframe('Teste do Box IFrame','http://www.bb.com.br','biTeste',500,800,false); |
| 81 | //$box->show(); |
| 82 | ?> |