__loadedFile = ""; $this->__comboStyles = true; $this->__controlName = ""; $this->__controlWidth = 0; $this->__controlHeight = 0; $this->__initialValue = ""; $this->__initialValueNoBase = ""; $this->__langPack = 0; $this->__hideCopy = 0; $this->__hideCut = 0; $this->__hidePaste = 0; $this->__hideSave = 0; $this->__hideSpelling = 0; $this->__hideRemoveTextFormatting = 0; $this->__hideFullScreen = 0; $this->__hideBold = 0; $this->__hideUnderline = 0; $this->__hideItalic = 0; $this->__hideStrikethrough = 0; $this->__hideNumberList = 0; $this->__hideBulletList = 0; $this->__hideDecreaseIndent = 0; $this->__hideIncreaseIndent = 0; $this->__hideSuperScript = 0; $this->__hideSubScript = 0; $this->__hideLeftAlign = 0; $this->__hideCenterAlign = 0; $this->__hideRightAlign = 0; $this->__hideJustify = 0; $this->__hideHorizontalRule = 0; $this->__hideLink = 0; $this->__hideAnchor = 0; $this->__hideMailLink = 0; $this->__hideHelp = 0; $this->__hideFont = 0; $this->__hideSize = 0; $this->__hideFormat = 0; $this->__hideStyle = 0; $this->__hideForeColor = 0; $this->__hideBackColor = 0; $this->__hideTable = 0; $this->__hideForm = 0; $this->__hideImage = 0; $this->__hideFlash = 0; $this->__hideFile = 0; $this->__hideMedia = 0; $this->__hideCustom = 0; $this->__flashPath = ""; $this->__mediaPath = ""; $this->__hideTextBox = 0; $this->__hideSymbols = 0; $this->__hideProps = 0; $this->__hideWord = 0; $this->__hideAbsolute = 0; $this->__hideClean = 0; $this->__hideGuidelines = 0; $this->__hideToolbarMode = 0; $this->__hidePositionAbsolute = 0; $this->__disableEditMode = 0; $this->__disableSourceMode = 0; $this->__disablePreviewMode = 0; $this->__guidelinesOnByDefault = 0; $this->__imagePath = ""; $this->__forcePasteWord = false; $this->__setCursor = false; $this->__hasFlashLibraries = false; $this->__hasAdditionalButtons = false; $this->__flashLibsArray = array(); $this->__baseHref = ""; $this->__numTopHidden = 0; $this->__numBottomHidden = 0; $this->__imagePathType = 0; $this->__docType = 0; $this->__imageDisplayType = -1; $this->__flashDisplayType = 0; $this->__disableImageUploading = 0; $this->__disableImageDeleting = 0; $this->__disableFlashUploading = 0; $this->__disableFlashDeleting = 0; $this->__disableMediaUploading = 0; $this->__disableMediaDeleting = 0; $this->__disableLinkUploading = 0; $this->__enableXHTMLSupport = 1; $this->__useSingleLineReturn = 1; $this->__customInsertArray = array(); $this->__customLinkArray = array(); $this->__toolbarset = array(); $this->__toolbarsetnames = array(); $this->__hasCustomInserts = false; $this->__hasCustomLinks = false; $this->__hasEventListener = false; $this->__snippetCSS = ""; $this->__textareaRows = 10; $this->__textareaCols = 30; $this->__fontNameList = ""; $this->__fontSizeList = ""; $this->__dt = ""; $this->__hideWebImage = 0; $this->__hideWebFlash = 0; $this->__hideTagBar = 0; $this->__language = 0; $this->__imageLibsArray = array(); $this->__eventListener = array(); $this->__skinName = "default"; $this->__hasImageLibraries = false; $this->__showLineNumber = 0; $this->__hideFlashTab = 0; $this->__hideMediaTab = 0; $this->__styles = ""; $this->__linkPath = ""; $this->__imageMaxWidth = 0; $this->__imageMaxHeight = 0; $this->__toolbarCount = 0; $this->__maxUploadFileSize = 0; if (@$_COOKIE["de_mode"]) { $this->__modeName = $_COOKIE["de_mode"]; } else { $this->__modeName = ""; } } function iepopupstyle() { $filePath = $GLOBALS['dname'] . '/skins/' . $this->__skinName . '/ie_popup.css'; $data = ''; if (is_file($filePath)) { $fp = fopen($filePath, 'rb'); if ($fp) { while (!feof($fp)) { $data .= fgets($fp, 1024); } fclose($fp); } } $find = '/\n/i'; $replace = ""; $data = preg_replace($find, $replace, $data); $find = '/\r/i'; $replace = ""; $data = preg_replace($find, $replace, $data); $find = '/"/i'; $replace = "'"; $data = preg_replace($find, $replace, $data); $find = '/\t/i'; $replace = ""; $data = preg_replace($find, $replace, $data); return $data; } function AddToolbarButton($ButtonName, $Width = 21, $Height = 20, $src = "", $jsfunc = "", $tb = "") { //Add toolbar button $this->__hasAdditionalButtons = true; $this->__toolbarbuttons[] = array("Name" => $ButtonName, "Width" => $Width , "Height" => $Height , "ImgSrc" => $src, "JSFunc" => $jsfunc, "Toolbar" => $tb); } function AddEventListener($event, $jsfunc = "") { // Add javascript event listener for Editor $this->__hasEventListener = true; $this->__eventListener[] = array("Name" => $event, "Func" => $jsfunc); } function __FormatEventListener() { // Private Function - This function will return all of the toolbar buttons as JavaScript arrays if ($this->__hasEventListener == true) { $ciText = "["; for ($i = 0; $i < sizeof($this->__eventListener); $i++) { $name = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__eventListener[$i]["Name"])); $func = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__eventListener[$i]["Func"])); $ciText .= "[\"" . $name . "\", \"" . $func . "\"],"; } $ciText = substr($ciText, 0, strlen($ciText)-1); $ciText .= "]"; } else { $ciText = "[]"; } return $ciText; } function __FormatToolbarButtons() { // Private Function - This function will return all of the toolbar buttons as JavaScript arrays if ($this->__hasAdditionalButtons == true) { $ciText = "["; for ($i = 0; $i < sizeof($this->__toolbarbuttons); $i++) { $name = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__toolbarbuttons[$i]["Name"])); $width = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__toolbarbuttons[$i]["Width"])); $height = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__toolbarbuttons[$i]["Height"])); $src = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__toolbarbuttons[$i]["ImgSrc"])); $jsfunc = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__toolbarbuttons[$i]["JSFunc"])); $tb = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__toolbarbuttons[$i]["Toolbar"])); $ciText .= "[\"" . $name . "\", \"" . $width . "\", \"" . $height . "\", \"" . $src . "\", \"" . $jsfunc . "\", \"" . $tb . "\"],"; } $ciText = substr($ciText, 0, strlen($ciText)-1); $ciText .= "]"; } else { $ciText = "[]"; } return $ciText; } function SetImageUploadSize($w,$h) { $this->__imageMaxWidth = $w; $this->__imageMaxHeight = $h; } function HideTagBar() { $this->__hideTagBar = true; } function SetMaxUploadFileSize($s) { $this->__maxUploadFileSize = $s; } function SetFocus() { $this->__setCursor = true; } function HideMediaTab() { $this->__hideMediaTab = true; } function HideFlashTab() { $this->__hideFlashTab = true; } function ShowLineNumber() { $this->__showLineNumber = true; } function AddToolbar($toolbarname, $list) { $this->__toolbarset[$toolbarname] = $list; $this->__toolbarsetnames[] = $toolbarname; } function ForcePasteWord() { $this->__forcePasteWord = true; } function SetLinkPath($p) { $this->__linkPath = $p; } function SetName($CtrlName) { $this->__controlName = $CtrlName; } function SetStyles($style) { $this->__styles = $style; } function SetWidth($Width) { $this->__controlWidth = $Width; } function SetHeight($Height) { $this->__controlHeight = $Height; } function SetBaseHref($BaseHref) { $this->__baseHref = $BaseHref; } function SetFlashPath($FlashPath) { $this->__flashPath = $FlashPath; } function SetMediaPath($Path) { $this->__mediaPath = $Path; } function SetValue($HTMLValue) { // modified for v5.0 $this->__initialValueNoBase = $HTMLValue; if ($this->__docType == DE_DOC_TYPE_SNIPPET) { if ($this->__baseHref != "") { $HTMLValue = "" . $HTMLValue . ""; } else { $HTMLValue = "" . $HTMLValue . ""; $this->__initialValueNoBase = "" . $this->__initialValueNoBase . ""; } } if ($this->__docType == DE_DOC_TYPE_SNIPPET && $this->__snippetCSS != "") { //$HTMLValue = "" . $HTMLValue; //$this->__initialValueNoBase = "" . $this->__initialValueNoBase; } // The editor dies if there are no head tags. Also technically // title tags in head tags are required for w3c validity so adding // the head tags isn't really that bad a thing if ($this->__docType == DE_DOC_TYPE_HTML_PAGE && strpos(strtolower($HTMLValue), "]*>)%si', '\1', $HTMLValue); $this->__initialValueNoBase = preg_replace('%(]*>)%si', '\1', $this->__initialValueNoBase); } if ($this->__docType == DE_DOC_TYPE_HTML_PAGE && !is_numeric(strpos(strtolower($HTMLValue), ""; $this->__initialValueNoBase = "" . $this->__initialValueNoBase . ""; } // end modification // Format the initial text so that we can set the content of the iFrame to its value $HTMLValue = str_replace(">", "&gt;", $HTMLValue); $HTMLValue = str_replace("<", "&lt;", $HTMLValue); $HTMLValue = str_replace(">", "&gt;", $HTMLValue); $HTMLValue = str_replace("<", "&lt;", $HTMLValue); $HTMLValue = str_replace("<", "&#60;", $HTMLValue); $HTMLValue = str_replace("'", "'", $HTMLValue); $HTMLValue = str_replace('"', '"', $HTMLValue); $this->__initialValue = $HTMLValue; if (preg_match( "/]+>/i", $this->__initialValue, $matches)){ $this->__dt = $matches[0]; }; } function GetValue($ConvertQuotes = true) { $tmpVal = @$_POST[$this->__controlName . "_html"]; if ($tmpVal=="")$tmpVal = @$_POST[$this->__controlName . "_input"]; if ($ConvertQuotes == false) { $tmpVal = str_replace("\\'", "'", $tmpVal); $tmpVal = str_replace('\\"', '"', $tmpVal); } return $tmpVal; } function HideCopyButton() { //Hide the save button $this->__hideCopy = true; $this->__numTopHidden++; } function HideCutButton() { //Hide the save button $this->__hideCut = true; $this->__numTopHidden++; } function HidePasteButton() { //Hide the save button $this->__hidePaste = true; $this->__numTopHidden++; } function HideSaveButton() { //Hide the save button $this->__hideSave = true; $this->__numTopHidden++; } function HideSpellingButton() { // Hide the spelling button $this->__hideSpelling = true; $this->__numTopHidden++; } function HideRemoveTextFormattingButton() { // Hide the remove text formatting button $this->__hideRemoveTextFormatting = true; $this->__numTopHidden++; } function HideFullScreenButton() { // Hide the fullscreen button $this->__hideFullScreen = true; $this->__numTopHidden++; } function HideBoldButton() { // Hide the bold button $this->__hideBold = true; $this->__numTopHidden++; } function HideUnderlineButton() { // Hide the underline button $this->__hideUnderline = true; $this->__numTopHidden++; } function HideItalicButton() { // Hide the italic button $this->__hideItalic = true; $this->__numTopHidden++; } function HideStrikethroughButton() { // Hide the strikethrough button $this->__hideStrikethrough = true; $this->__numTopHidden++; } function HideNumberListButton() { // Hide the number list button $this->__hideNumberList = true; $this->__numTopHidden++; } function HideBulletListButton() { // Hide the bullet list button $this->__hideBulletList = true; $this->__numTopHidden++; } function HideDecreaseIndentButton() { // Hide the decrease indent button $this->__hideDecreaseIndent = true; $this->__numTopHidden++; } function HideIncreaseIndentButton() { // Hide the increase indent button $this->__hideIncreaseIndent = true; $this->__numTopHidden++; } function HideSuperScriptButton() { // Hide the super script button $this->__hideSuperScript = true; $this->__numTopHidden++; } function HideSubScriptButton() { // Hide the sub script button $this->__hideSubScript = true; $this->__numTopHidden++; } function HideLeftAlignButton() { // Hide the left align button $this->__hideLeftAlign = true; $this->__numTopHidden++; } function HideCenterAlignButton() { // Hide the center align button $this->__hideCenterAlign = true; $this->__numTopHidden++; } function HideRightAlignButton() { // Hide the right align button $this->__hideRightAlign = true; $this->__numTopHidden++; } function HideJustifyButton() { // Hide the justify button $this->__hideJustify = true; $this->__numTopHidden++; } function HideHorizontalRuleButton() { // Hide the horizontal rule button $this->__hideHorizontalRule = true; $this->__numTopHidden++; } function HideLinkButton() { // Hide the link button $this->__hideLink = true; $this->__numTopHidden++; } function HideAnchorButton() { // Hide the anchor button $this->__hideAnchor = true; $this->__numTopHidden++; } function HideMailLinkButton() { // Hide the mail link button $this->__hideMailLink = true; $this->__numTopHidden++; } function HideHelpButton() { // Hide the help button $this->__hideHelp = true; $this->__numTopHidden++; } function HideFontList() { // Hide the font list $this->__hideFont = true; $this->__numBottomHidden++; } function HideSizeList() { // Hide the size list $this->__hideSize = true; $this->__numBottomHidden++; } function HideFormatList() { // Hide the format list $this->__hideFormat = true; $this->__numBottomHidden++; } function HideStyleList() { // Hide the style list $this->__hideStyle = true; $this->__numBottomHidden++; } function HideForeColorButton() { // Hide the forecolor button $this->__hideForeColor = true; $this->__numBottomHidden++; } function HideBackColorButton() { // Hide the backcolor button $this->__hideBackColor = true; $this->__numBottomHidden++; } function HideTableButton() { // Hide the table button $this->__hideTable = true; $this->__numBottomHidden++; } function HideCustomButton() { // Hide the custom insert button $this->__hideCustom = true; $this->__numBottomHidden++; } function HideFormButton() { // Hide the form button $this->__hideForm = true; $this->__numBottomHidden++; } function HideImageButton() { // Hide the image button $this->__hideImage = true; $this->__numBottomHidden++; } function HideFileButton() { // Hide the file button $this->__hideFile = true; $this->__numBottomHidden++; } function HideMediaButton() { // Hide the media button $this->__hideMedia = true; $this->__numBottomHidden++; } function HideFlashButton() { //Hide the flash button $this->__hideFlash = true; $this->__numBottomHidden++; } function HideTextBoxButton() { // Hide the image button $this->__hideTextBox = true; $this->__numBottomHidden++; } function HideSymbolButton() { // Hide the symbol button $this->__hideSymbols = true; $this->__numBottomHidden++; } function HidePropertiesButton() { // Hide the properties button $this->__hideProps = true; $this->__numBottomHidden++; } function HideCleanHTMLButton() { // Hide the clean HTML button $this->__hideClean = true; $this->__numBottomHidden++; } function HidePositionAbsoluteButton() { // Hide the position absolute button $this->__hideAbsolute = true; $this->__numBottomHidden++; } function HideGuidelinesButton() { // Hide the guidelines button $this->__hideGuidelines = true; $this->__numBottomHidden++; } function HideToolbarMode() { // Hide the toolabar mode link $this->__hideToolbarMode = true; $this->__numBottomHidden++; } function SetDevEditMode($mode = "advanced") { if ($this->__modeName=="") { $this->__modeName = $mode; } } function DisableComboStyles() { $this->__comboStyles = false; } function DisableEditMode() { // Hide the source mode button $this->__disableEditMode = true; } function DisableSourceMode() { // Hide the source mode button $this->__disableSourceMode = true; } function DisablePreviewMode() { // Hide the preview mode button $this->__disablePreviewMode = true; } function EnableGuidelines() { // Set the table guidelines on by default $this->__guidelinesOnByDefault = true; } function SetPathType($PathType) { // How do we want to include the path to the images? 0 = Full, 1 = Absolute $this->__imagePathType = $PathType; } function SetDevEditSkin($Path) { $this->__skinName = $Path; } function SetDocumentType($DocType) { // Is the user editing a full HTML document $this->__docType = $DocType; } function SetImageDisplayType($DisplayType) { // How should the images be displayed in the image manager? 0 = Line / 1 = Thumbnails $this->__imageDisplayType = $DisplayType; } function DisableImageUploading() { // Do we need to stop images being uploaded? $this->__disableImageUploading = 1; } function DisableLinkUploading() { // Do we need to stop file being uploaded in the link manager? $this->__disableLinkUploading = 1; } function DisableImageDeleting() { // Do we need to stop images from being delete? $this->__disableImageDeleting = 1; } function SetFlashDisplayType($DisplayType) { //How should the flash files be displayed in the image manager? 0 = Line / 1 = Thumbnails $this->__flashDisplayType = $DisplayType; } function DisableFlashUploading() { //Do we need to stop flash files being uploaded? $this->__disableFlashUploading = 1; } function DisableFlashDeleting() { //Do we need to stop flash files from being deleted? $this->__disableFlashDeleting = 1; } function DisableMediaUploading() { //Do we need to stop flash files being uploaded? $this->__disableMediaUploading = 1; } function DisableMediaDeleting() { //Do we need to stop flash files from being deleted? $this->__disableMediaDeleting = 1; } function isIE55OrAbove() { // Is it MSIE? $browserCheck1 = ( is_numeric(strpos($_SERVER["HTTP_USER_AGENT"], "MSIE")) ) ? true : false; // Is it NOT Opera? $browserCheck2 = ( !is_numeric(strpos($_SERVER["HTTP_USER_AGENT"], "Opera")) ) ? true : false; // Is it MSIE 5 or above? // Modified for v5.0 or above $browserCheck3 = ( is_numeric(strpos($_SERVER["HTTP_USER_AGENT"], "MSIE 5.5")) || is_numeric(strpos($_SERVER["HTTP_USER_AGENT"], "MSIE 6")) ) ? true : false; $browserCheck4 = is_numeric(strpos($_SERVER["HTTP_USER_AGENT"], "Windows")); if ($browserCheck4 == 0) { $browserCheck4 = false; } else { $browserCheck4 = true; } if ($browserCheck1 && $browserCheck2 && $browserCheck3 && $browserCheck4) { return true; } else { return false; } } // ------------------------- // Version 3.0 new functions function DisableXHTMLFormatting() { // Disable XHTML formatting of inline code $this->__enableXHTMLSupport = 0; } function DisableSingleLineReturn() { // Instead of adding a

tag for a new line, add
instead $this->__useSingleLineReturn = 0; } function LoadHTMLFromMySQLQuery($DatabaseServer, $DatabaseName, $DatabaseUser, $DatabasePassword, $DatabaseQuery, &$ErrorDesc) { // Grabs a value from a MySQL database based on a SELECT query. // It will return a text value from the field on success, or false on failure $sConn = false; $dConn = false; $mRow = false; $mResult = false; if (!$sConn = @mysql_connect($DatabaseServer, $DatabaseUser, $DatabasePassword)) { // Server connection failed $ErrorDesc = mysql_error(); return false; } else { // Server connection was successful if (! $dConn = @mysql_select_db($DatabaseName, $sConn)) { // Database connection failed $ErrorDesc = mysql_error(); return false; } else { // Database connection was successful if (!$mResult = @mysql_query($DatabaseQuery)) { // Query Failed $ErrorDesc = mysql_error(); return false; } else { // Query was OK. Did it return a row? if (@mysql_num_rows($mResult) == 0) { // No rows returned $ErrorDesc = mysql_error(); return false; } else { // Grab the first row's contents and return it if (!$mRow = mysql_fetch_row($mResult)) { // Error returning row $ErrorDesc = mysql_error(); return false; } else { // Set the contents of the DevEdit control to this value $this->SetValue($mRow[0]); return true; } } } } } } function LoadFromFile($FilePath, &$ErrorDesc) { $this->__loadedFile = $FilePath; // Grabs the contents of a file and sets the value // of the DevEdit control to the text in this file $fp = false; if (!$fp = @fopen($FilePath, "rb")) { // Failed to open the file $ErrorDesc = "Failed to open file $FilePath"; return false; } else { $data = ""; // File was opened OK, read it in while (!feof($fp)) { $data .= fgets($fp, 4096); } // Set the value to the contents of this file $this->SetValue($data); return true; } } function SaveToFile($FilePath, &$ErrorDesc) { $fp = false; // Writes the contents of the DevEdit control to a file if (strlen($this->GetValue(false)) == 0) { // No data to write to the file $ErrorDesc = "Cannot save an empty value to $FilePath"; return false; } else { // The form has been submitted, save its contents if (! $fp = @fopen($FilePath, "w")) { // Failed to open the file $ErrorDesc = "Failed to open file $FilePath"; return false; } else { // File was opened OK, write to it if (! is_writable($FilePath)) { // Can't write to the file $ErrorDesc = "You do not have write permissions for $FilePath"; return false; } else { if (! fwrite($fp, $this->GetValue(false))) { // Failed to write to the file $ErrorDesc = "An error occured while writing to $FilePath"; return false; } else { // Write went OK return true; } } } } } function AddCustomInsert($InsertName, $InsertHTMLCode) { $this->__hasCustomInserts = true; $this->__customInsertArray[] = array("Name" => $InsertName, "HTML" => $InsertHTMLCode); } function AddCustomLink($LinkName, $LinkURL, $TargetWindow = "") { $this->__hasCustomLinks = true; $this->__customLinkArray[] = array("Name" => $LinkName, "URL" => $LinkURL, "Target" => $TargetWindow); } function AddImageLibrary($LibraryName, $LibraryPath) { if (!in_array($LibraryName, $this->__imageLibsArray)) { $this->__hasImageLibraries = true; $this->__imageLibsArray[] = array($LibraryName, $LibraryPath); } } function AddFlashLibrary($LibraryName, $LibraryPath) { if (!in_array($LibraryName, $this->__flashLibsArray)) { $this->__hasFlashLibraries = true; $this->__flashLibsArray[] = array($LibraryName, $LibraryPath); } } function __FormatCustomInsertText() { // Private Function - This function will return all of the custom inserts as JavaScript arrays if ($this->__hasCustomInserts == true) { $ciText = "["; for ($i = 0; $i < sizeof($this->__customInsertArray); $i++) { $name = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__customInsertArray[$i]["Name"])); $html = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__customInsertArray[$i]["HTML"])); $ciText .= "[\"" . $name . "\", \"" . $html . "\"],"; } $ciText = substr($ciText, 0, strlen($ciText)-1); $ciText .= "]"; } else { $ciText = "[]"; } return $ciText; } function __FormatCustomLinkText() { // Private Function - This function will return all of the custom links as JavaScript arrays if ($this->__hasCustomLinks == true) { $ciText = "["; for ($i = 0; $i < sizeof($this->__customLinkArray); $i++) { $name = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__customLinkArray[$i]["Name"])); $url = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__customLinkArray[$i]["URL"])); $target = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__customLinkArray[$i]["Target"])); $ciText .= "[\"" . $name . "\", \"" . $url . "\",\"" . $target . "\"],"; } $ciText = substr($ciText, 0, strlen($ciText)-1); $ciText .= "]"; } else { $ciText = "[]"; } return $ciText; } function __FormatToolbarList() { if ($this->__toolbarset == true) { $ciText = "["; for ($i = 0; $i < sizeof($this->__toolbarset); $i++) { $name = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__customLinkArray[$i]["Name"])); $url = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__customLinkArray[$i]["URL"])); $target = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__customLinkArray[$i]["Target"])); $ciText .= "[\"" . $name . "\", \"" . $url . "\",\"" . $target . "\"],"; } $ciText = substr($ciText, 0, strlen($ciText)-1); $ciText .= "]"; } else { $ciText = "[]"; } return $ciText; } function GetImageLibraries() { // Private Function - This function will return all of the image libraries as JavaScript arrays $ciText = ""; if ($this->__hasImageLibraries == true) { for ($i = 0; $i < sizeof($this->__imageLibsArray); $i++) { $name = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__imageLibsArray[$i][0])); $dir = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__imageLibsArray[$i][1])); $ciText .= ""; } } return str_replace("'", "\'", $ciText); } function GetFlashLibraries() { // Private Function - This function will return all of the flash libraries as JavaScript arrays $ciText = ""; if ($this->__hasFlashLibraries == true) { for ($i = 0; $i < sizeof($this->__flashLibsArray); $i++) { $name = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__flashLibsArray[$i][0])); $dir = str_replace("\r\n", "\\r\\n", str_replace("\"", "\\\"", $this->__flashLibsArray[$i][1])); $ciText .= ""; } } return str_replace("'", "\'", $ciText); } function SetSnippetStyleSheet($StyleSheetURL) { // Sets the location of the stylesheet for a code snippet $this->__docType = DE_DOC_TYPE_SNIPPET; $this->__snippetCSS = $StyleSheetURL; } function SetTextAreaDimensions($Cols, $Rows) { // Sets the rows and cols attributes of the