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

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

00001 <?PHP
00002 include_once("LabelText.php");
00003 
00004 
00005 class LabelTextPaging extends LabelText
00006 {
00007  
00008        public $m_CurrentCss;
00009        public $m_CurrentPage;
00010        public $m_TotalPage;
00011        
00012     protected function readMetaData(&$xmlArr)
00013     {
00014         parent::readMetaData($xmlArr);
00015         $this->m_CurrentCss = isset($xmlArr["ATTRIBUTES"]["CURRENTCSSCLASS"]) ? $xmlArr["ATTRIBUTES"]["CURRENTCSSCLASS"] : null;
00016         $this->m_CurrentPage = isset($xmlArr["ATTRIBUTES"]["CURRENTPAGE"]) ? $xmlArr["ATTRIBUTES"]["CURRENTPAGE"]  : null;
00017         $this->m_TotalPage = isset($xmlArr["ATTRIBUTES"]["TOTALPAGE"]) ? $xmlArr["ATTRIBUTES"]["TOTALPAGE"]  : null;        
00018     }
00019 
00020  
00021     public function render()
00022     {
00023               $formobj = $this->getFormObj();
00024         $this->m_TotalPage         = Expression::evaluateExpression($this->m_TotalPage, $formobj);
00025         $this->m_CurrentPage       = Expression::evaluateExpression($this->m_CurrentPage, $formobj);
00026        
00027         $style = $this->getStyle();
00028         $id = $this->m_Name;
00029         $func = $this->getFunction();
00030               $sHTML="";
00031               $link = $this->getLink();
00032         $target = $this->getTarget();
00033         
00034         for ($i=1; $i<$this->m_TotalPage+1; $i++){
00035            if($i == $this->m_CurrentPage){
00036                      $sHTML .= "<a id=\"$id\" href=\"".$link.$i."\" $target $func class=\"".$this->m_CurrentCss."\">" . $i . "</a>";
00037            }else{
00038               $sHTML .= "<a id=\"$id\" href=\"".$link.$i."\" $target $func $style>" . $i . "</a>";       
00039            }
00040        }       
00041 
00042         return $sHTML;
00043     }
00044 
00045 }
00046 
00047 ?>

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