first commit
This commit is contained in:
1
standort/FCKeditor/_samples/afp/fck.afpa
Normal file
1
standort/FCKeditor/_samples/afp/fck.afpa
Normal file
@ -0,0 +1 @@
|
||||
<application ID="fck"/>
|
121
standort/FCKeditor/_samples/afp/fck.afpa.code
Normal file
121
standort/FCKeditor/_samples/afp/fck.afpa.code
Normal file
@ -0,0 +1,121 @@
|
||||
DEFINE CLASS fckeditor AS custom
|
||||
cInstanceName =""
|
||||
BasePath =""
|
||||
cWIDTH =""
|
||||
cHEIGHT =""
|
||||
ToolbarSet =""
|
||||
cValue=""
|
||||
DIMENSION aConfig(10,2)
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION fckeditor( tcInstanceName )
|
||||
LOCAL lnLoop,lnLoop2
|
||||
THIS.cInstanceName = tcInstanceName
|
||||
THIS.BasePath = '../../'
|
||||
THIS.cWIDTH = '100%'
|
||||
THIS.cHEIGHT = '200'
|
||||
THIS.ToolbarSet = 'Default'
|
||||
THIS.cValue = ''
|
||||
FOR lnLoop=1 TO 10
|
||||
FOR lnLoop2=1 TO 2
|
||||
THIS.aConfig(lnLoop,lnLoop2) = ""
|
||||
NEXT
|
||||
NEXT
|
||||
RETURN
|
||||
ENDFUNC
|
||||
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION CREATE()
|
||||
RETURN(THIS.CreateHtml())
|
||||
ENDFUNC
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION CreateHtml()
|
||||
LOCAL html
|
||||
LOCAL lcLink
|
||||
|
||||
HtmlValue = THIS.cValue && HTMLSPECIALCHARS()
|
||||
|
||||
html = [<div>]
|
||||
IF THIS.IsCompatible()
|
||||
lcLink = THIS.BasePath+[editor/fckeditor.html?InstanceName=]+THIS.cInstanceName
|
||||
|
||||
IF ( THIS.ToolbarSet # '' )
|
||||
lcLink = lcLink + [Toolbar=]+THIS.ToolbarSet
|
||||
ENDIF
|
||||
|
||||
&& Render the LINKED HIDDEN FIELD.
|
||||
html = html + [<input type="hidden" id="]+THIS.cInstanceName +[" name="]+THIS.cInstanceName +[" value="]+HtmlValue+[">]
|
||||
|
||||
&& Render the configurations HIDDEN FIELD.
|
||||
html = html + [<input type="hidden" id="]+THIS.cInstanceName +[___Config" value="]+THIS.GetConfigFieldString() + [">] +CHR(13)+CHR(10)
|
||||
|
||||
&& Render the EDITOR IFRAME.
|
||||
html = html + [<iframe id="]+THIS.cInstanceName +[___Frame" src="]+lcLink+[" width="]+THIS.cWIDTH+[" height="]+THIS.cHEIGHT+[" frameborder="0" scrolling="no"></iframe>]
|
||||
ELSE
|
||||
IF ( AT("%", THIS.cWIDTH)=0 )
|
||||
WidthCSS = THIS.cWIDTH + 'px'
|
||||
ELSE
|
||||
WidthCSS = THIS.cWIDTH
|
||||
ENDIF
|
||||
|
||||
IF ( AT("%",THIS.cHEIGHT)=0 )
|
||||
HeightCSS = THIS.cHEIGHT + 'px'
|
||||
ELSE
|
||||
HeightCSS = THIS.cHEIGHT
|
||||
ENDIF
|
||||
|
||||
html = html + [<textarea name="]+THIS.cInstanceName +[" rows="4" cols="40" style="width: ]+WidthCSS+[ height: ]+HeightCSS+[" wrap="virtual">]+HtmlValue+[</textarea>]
|
||||
ENDIF
|
||||
|
||||
html = html + [</div>]
|
||||
|
||||
RETURN (html)
|
||||
ENDFUNC
|
||||
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION IsCompatible()
|
||||
LOCAL llRetval
|
||||
LOCAL sAgent
|
||||
|
||||
llRetval=.F.
|
||||
|
||||
sAgent= LOWER(Request.ServerVariables("HTTP_USER_AGENT"))
|
||||
|
||||
IF AT("msie",sAgent) >0 .AND. AT("mac",sAgent)=0 .AND. AT("opera",sAgent)=0
|
||||
iVersion=VAL(SUBSTR(sAgent,AT("msie",sAgent)+5,3))
|
||||
llRetval= iVersion > 5.5
|
||||
ELSE
|
||||
IF AT("gecko",sAgent)>0
|
||||
iVersion=VAL(SUBSTR(sAgent,AT("gecko/",sAgent)+6,8))
|
||||
llRetval =iVersion > 20030210
|
||||
ENDIF
|
||||
ENDIF
|
||||
RETURN (llRetval)
|
||||
ENDFUNC
|
||||
|
||||
&& -----------------------------------------------------------------------
|
||||
FUNCTION GetConfigFieldString()
|
||||
LOCAL sParams
|
||||
LOCAL bFirst
|
||||
LOCAL sKey
|
||||
sParams = ""
|
||||
bFirst = .T.
|
||||
FOR lnLoop=1 TO 10 && ALEN(this.aconfig)
|
||||
IF !EMPTY(THIS.aConfig(lnLoop,1))
|
||||
IF bFirst = .F.
|
||||
sParams = sParams + "&"
|
||||
ELSE
|
||||
bFirst = .F.
|
||||
ENDIF
|
||||
sParams = sParams +THIS.aConfig(lnLoop,1)+[=]+THIS.aConfig(lnLoop,2)
|
||||
ELSE
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
RETURN(sParams)
|
||||
ENDFUNC
|
||||
ENDDEFINE
|
||||
|
52
standort/FCKeditor/_samples/afp/sample01.afp
Normal file
52
standort/FCKeditor/_samples/afp/sample01.afp
Normal file
@ -0,0 +1,52 @@
|
||||
<%
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* File Name: sampleposteddata.php
|
||||
* This page lists the data posted by a form.
|
||||
*
|
||||
* Version: 1.0
|
||||
* Modified: 2005-07-01
|
||||
*
|
||||
* File Authors: Soenke Freitag (www.afp-hosting.de)
|
||||
*
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Sample</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - AFP - Sample 1</h1>
|
||||
This sample displays a normal HTML form with an FCKeditor with full features enabled.
|
||||
<hr>
|
||||
<form action="sampleposteddata.afp" method="post" target="_blank">
|
||||
<%
|
||||
|
||||
sBasePath="../../fckeditor/" && Change this to your local path
|
||||
|
||||
lcText=[This is some <strong>sample text</strong>. You are using ]
|
||||
lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
|
||||
|
||||
oFCKeditor = CREATEOBJECT("FCKeditor")
|
||||
oFCKeditor.fckeditor("FCKeditor1")
|
||||
oFCKeditor.BasePath = sBasePath
|
||||
oFCKeditor.cValue = lcText
|
||||
|
||||
? oFCKeditor.Create()
|
||||
|
||||
%>
|
||||
<br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
54
standort/FCKeditor/_samples/afp/sampleposteddata.afp
Normal file
54
standort/FCKeditor/_samples/afp/sampleposteddata.afp
Normal file
@ -0,0 +1,54 @@
|
||||
<%
|
||||
* FCKeditor - The text editor for internet
|
||||
* Copyright (C) 2003-2004 Frederico Caldeira Knabben
|
||||
*
|
||||
* Licensed under the terms of the GNU Lesser General Public License:
|
||||
* http://www.opensource.org/licenses/lgpl-license.php
|
||||
*
|
||||
* For further information visit:
|
||||
* http://www.fckeditor.net/
|
||||
*
|
||||
* File Name: sampleposteddata.php
|
||||
* This page lists the data posted by a form.
|
||||
*
|
||||
* Version: 1.0
|
||||
* Modified: 2005-07-01
|
||||
*
|
||||
* File Authors: Soenke Freitag (www.afp-hosting.de)
|
||||
*
|
||||
%>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>FCKeditor - Samples - Posted Data</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link href="../sample.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>FCKeditor - Samples - Posted Data</h1>
|
||||
This page lists all data posted by the form.
|
||||
<hr>
|
||||
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
|
||||
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
|
||||
<td nowrap>Field Name </td>
|
||||
<td>Value</td>
|
||||
</tr>
|
||||
<%
|
||||
lcForm=REQUEST.Form()
|
||||
lcForm=STRTRAN(lcForm,"&",CHR(13)+CHR(10))
|
||||
|
||||
FOR lnLoop=1 TO MEMLINES(lcForm)
|
||||
lcZeile=ALLTRIM(MLINE(lcForm,lnLoop))
|
||||
IF AT("=",lcZeile)>0
|
||||
lcVariable=UPPER(ALLTRIM(LEFT(lcZeile,AT("=",lcZeile)-1)))
|
||||
lcWert=ALLTRIM(RIGHT(lcZeile,LEN(lcZeile)-AT("=",lcZeile)))
|
||||
lcWert=Server.UrlDecode( lcWert )
|
||||
|
||||
? [<tr><td>]+lcVariable+[ =</td><td>]+lcWert+[</td></tr>]
|
||||
ENDIF
|
||||
NEXT
|
||||
%>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user