2
* FCKeditor - The text editor for internet
3
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
5
* Licensed under the terms of the GNU Lesser General Public License:
6
* http://www.opensource.org/licenses/lgpl-license.php
8
* For further information visit:
9
* http://www.fckeditor.net/
11
* File Name: sampleposteddata.afp
12
* This page lists the data posted by a form.
15
* Modified: 2005-07-01
17
* File Authors: Soenke Freitag (www.afp-hosting.de)
20
DEFINE CLASS goFckeditor AS CONTAINER OLEPUBLIC
28
DIMENSION aConfig(10,2)
30
&& -----------------------------------------------------------------------
31
FUNCTION fckeditor( tcInstanceName )
33
THIS.cInstanceName = tcInstanceName
34
THIS.BasePath = '/FCKeditor/'
37
THIS.ToolbarSet = 'Default'
41
THIS.aConfig(lnLoop,lnLoop2) = ""
48
&& -----------------------------------------------------------------------
54
&& -----------------------------------------------------------------------
59
HtmlValue = THIS.cValue && HTMLSPECIALCHARS()
62
IF THIS.IsCompatible()
63
lcLink = THIS.BasePath+[editor/fckeditor.html?InstanceName=]+THIS.cInstanceName
65
IF ( THIS.ToolbarSet # '' )
66
lcLink = lcLink + [Toolbar=]+THIS.ToolbarSet
69
&& Render the LINKED HIDDEN FIELD.
70
html = html + [<input type="hidden" id="]+THIS.cInstanceName +[" name="]+THIS.cInstanceName +[" value="]+HtmlValue+[" style="display:none" />]
72
&& Render the configurations HIDDEN FIELD.
73
html = html + [<input type="hidden" id="]+THIS.cInstanceName +[___Config" value="]+THIS.GetConfigFieldString() + [" style="display:none" />] +CHR(13)+CHR(10)
75
&& Render the EDITOR IFRAME.
76
html = html + [<iframe id="]+THIS.cInstanceName +[___Frame" src="Link" width="]+THIS.cWIDTH+[" height="]+THIS.cHEIGHT+[" frameborder="no" scrolling="no"></iframe>]
78
IF ( AT("%", THIS.cWIDTH)=0 )
79
WidthCSS = THIS.cWIDTH + 'px'
81
WidthCSS = THIS.cWIDTH
84
IF ( AT("%",THIS.cHEIGHT)=0 )
85
HeightCSS = THIS.cHEIGHT + 'px'
87
HeightCSS = THIS.cHEIGHT
90
html = html + [<textarea name="]+THIS.cInstanceName +[" rows="4" cols="40" style="width: ]+WidthCSS+[ height: ]+HeightCSS+[">]+HtmlValue+[</textarea>]
93
html = html + [</div>]
99
&& -----------------------------------------------------------------------
100
FUNCTION IsCompatible()
107
sAgent = LOWER(ALLTRIM(request.servervariables("HTTP_USER_AGENT")))
109
IF AT("msie",sAgent) >0 .AND. AT("mac",sAgent)=0 .AND. AT("opera",sAgent)=0
110
iVersion=VAL(SUBSTR(sAgent,AT("msie",sAgent)+5,3))
111
llRetval= iVersion > 5.5
113
IF AT("gecko",sAgent)>0
114
iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,8))
115
llRetval =iVersion > 20030210
121
&& -----------------------------------------------------------------------
122
FUNCTION GetConfigFieldString()
128
FOR lnLoop=1 TO 10 && ALEN(this.aconfig)
129
IF !EMPTY(THIS.aConfig(lnLoop,1))
131
sParams = sParams + "&"
135
sParams = sParams +THIS.aConfig(lnLoop,1)+[=]+THIS.aConfig(lnLoop,2)
b'\\ No newline at end of file'