• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List

E:/E/GEAMP/www/openbiz/openbiz/bin/easy/element/Button.php

00001 <?PHP
00017 include_once("InputElement.php");
00018 
00027 class Button extends InputElement
00028 {
00034     public $m_Image;
00035 
00042     protected function readMetaData(&$xmlArr)
00043     {
00044         parent::readMetaData($xmlArr);
00045         $this->m_Image = isset($xmlArr["ATTRIBUTES"]["IMAGE"]) ? $xmlArr["ATTRIBUTES"]["IMAGE"] : null;
00046     }
00047 
00053     public function render()
00054     {
00055         $style = $this->getStyle();
00056         $func = $this->getEnabled() == 'N' ? "" : $this->getFunction();
00057         $id      = $this->m_Name;
00058 
00059         if ($this->m_Image)
00060         {
00061             $imagesPath = Resource::getImageUrl();
00062             $out = "<img src=\"$imagesPath/" . $this->m_Image . "\" border=0 title=\"" . $this->m_Text . "\" />";
00063             if ($func != "")
00064                 $out = "<a href='javascript:void(0);' $this->m_HTMLAttr $style $func>".$out."</a>";
00065         }
00066         else
00067         {
00068             $out = $this->getText();
00069             //$out = "<input id=\"$id\" type='button' value='$out' $this->m_HTMLAttr $style $func>";
00070             $out = "<a href='javascript:void(0);' $this->m_HTMLAttr $style $func>".$out."</a>";
00071         }
00072 
00073         return $out . "\n" . $this->addSCKeyScript();
00074     }
00075 }
00076 
00077 ?>

Generated on Thu Apr 19 2012 17:09:13 for openbiz by  doxygen 1.7.2