Location: PHPKode > scripts > RSPA > rspa/components/FCKEditors.class.php
<?php
/**
  *
  *  Author : Sunish Kumar M.V
  *
  *  This is licenced under LGPL licence.
  *
  **/
class FCKEditors extends Component{
   var $value;    //Property
 	var $style; 	
 	var $name;
 	var $valChanged = false;
 	var $styleChanged = false;
 	var $disabled;
 	var $disabledChanged = false;
	
	function __construct($nm,$val){
		parent::__construct($nm,$val);		
 	}
	
	function FCKEditors($nm,$val){
		$this->Component($nm,$val);
	}

	function setValue($value){
 		$this->valChanged = true;
       $this->value = utf8_encode($value);
 	}
 	
 	function getValue(){
 	   return $this->value;	
 	}

 	function setName($nm){
 			$this->name = $nm;
 	}
 	function getName() {
 		return $this->name;	
 	}
 	
 	function hasChanged() {
 		 return ($this->valChanged || $this->styleChanged || $this->disabledChanged);
 	}
 	
 	function getComponentXml(){
 		if(! $this->hasChanged()) return "";
 		
 		$xml = "<FCKEditor name=\"{$this->name}\" ";
 		
 			if($this->valChanged){
				$xml .= "value= \"".htmlspecialchars($this->value)."\" ";
	 		}
 		
 		 if($this->styleChanged){
	 				$xml .= "style=\"" .htmlspecialchars($this->style)."\" ";
	 			}
		if($this->disabledChanged ){
			$xml .= "disabled=\"" .($this->disabled?"true":"false")."\" ";
		}
 		
 		$xml .= " ></FCKEditor>";
		return $xml;
 	} 	
}
?>
Return current item: RSPA