00001 <?php 00002 include_once("Element.php"); 00003 00004 class IFrameBox extends Element 00005 { 00006 00007 public $m_Link; 00008 public $m_Label; 00009 00010 protected function readMetaData(&$xmlArr) 00011 { 00012 parent::readMetaData($xmlArr); 00013 $this->m_Link = isset($xmlArr["ATTRIBUTES"]["LINK"]) ? $xmlArr["ATTRIBUTES"]["LINK"] : null; 00014 $this->m_Label = isset($xmlArr["ATTRIBUTES"]["LABEL"]) ? $xmlArr["ATTRIBUTES"]["LABEL"] : null; 00015 } 00016 protected function getLink() 00017 { 00018 if ($this->m_Link == null) 00019 return null; 00020 $formobj = $this->getFormObj(); 00021 return Expression::evaluateExpression($this->m_Link, $formobj); 00022 } 00023 public function renderLabel() 00024 { 00025 return $this->m_Label; 00026 } 00027 public function render(){ 00028 $link = $this->getLink(); 00029 $text = $this->getText(); 00030 $height = $this->m_Height; 00031 $width = $this->m_Width; 00032 $sHTML = "<iframe src=\"$link\" width=\"$width\" height=\"$height\" frameborder=\"0\" scrolling=\"auto\" > 00033 <p>$text</p></iframe>"; 00034 return $sHTML; 00035 00036 } 00037 } 00038 ?>