ToolbarSet = '' ;
$this->Value = '' ;
$this->CanUpload = 'none' ;
$this->CanBrowse = 'none' ;
}
function CreateFCKeditor($instanceName, $width, $height)
{
echo $this->ReturnFCKeditor($instanceName, $width, $height) ;
}
function ReturnFCKeditor($instanceName, $width, $height)
{
// $grstr = htmlentities( $this->Value ) ;
$grstr = htmlspecialchars( $this->Value ) ;
$strEditor = "" ;
if ( $this->IsCompatible() )
{
global $FCKeditorBasePath ;
$sLink = $FCKeditorBasePath . "fckeditor.html?FieldName=$instanceName" ;
if ( $this->ToolbarSet != '' )
$sLink = $sLink . "&Toolbar=$this->ToolbarSet" ;
if ( $this->CanUpload != 'none' )
{
if ($this->CanUpload == true)
$sLink = $sLink . "&Upload=true" ;
else
$sLink = $sLink . "&Upload=false" ;
}
if ( $this->CanBrowse != 'none' )
{
if ($this->CanBrowse == true)
$sLink = $sLink . "&Browse=true" ;
else
$sLink = $sLink . "&Browse=false" ;
}
$strEditor .= "" ;
$strEditor .= "" ;
}
else
{
$strEditor .= "" ;
}
return $strEditor;
}
function IsCompatible()
{
$sAgent = $_SERVER['HTTP_USER_AGENT'] ;
if ( is_integer( strpos($sAgent, 'MSIE') ) && is_integer( strpos($sAgent, 'Windows') ) && !is_integer( strpos($sAgent, 'Opera') ) )
{
$iVersion = (int)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 1) ;
return ($iVersion >= 5) ;
} else {
return FALSE ;
}
}
}
?>