[ Index ]
 

Code source de FCKeditor 2.4

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/_samples/afp/ -> sample02.afp (source)

   1  <% 
   2   * FCKeditor - The text editor for Internet - http://www.fckeditor.net
   3   * Copyright (C) 2003-2007 Frederico Caldeira Knabben
   4   * 
   5   * == BEGIN LICENSE ==
   6   * 
   7   * Licensed under the terms of any of the following licenses at your
   8   * choice:
   9   * 
  10   *  - GNU General Public License Version 2 or later (the "GPL")
  11   *    http://www.gnu.org/licenses/gpl.html
  12   * 
  13   *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
  14   *    http://www.gnu.org/licenses/lgpl.html
  15   * 
  16   *  - Mozilla Public License Version 1.1 or later (the "MPL")
  17   *    http://www.mozilla.org/MPL/MPL-1.1.html
  18   * 
  19   * == END LICENSE ==
  20   * 
  21   * File Name: sample02.afp
  22   *     This page is a basic Sample for FCKeditor integration in the AFP script language (www.afpages.de)
  23   * 
  24   * Version:  1.00 
  25   * Modified: 2006-11-13
  26   * 
  27   * File Authors: Soenke Freitag (contact at www.afp-hosting.de)
  28   *                  Frederico Caldeira Knabben (fredck@fckeditor.net)
  29  
  30  %>
  31  
  32  <html>
  33      <head>
  34          <title>FCKeditor - AFP Sample 2</title>
  35          <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  36          <meta name="robots" content="noindex, nofollow">
  37          <link href="../sample.css" rel="stylesheet" type="text/css" />
  38  
  39          <script type="text/javascript">
  40  		function FCKeditor_OnComplete( editorInstance )
  41          {
  42                  var oCombo = document.getElementById( 'cmbLanguages' ) ;
  43              for ( code in editorInstance.Language.AvailableLanguages )
  44              {
  45                  AddComboOption( oCombo, editorInstance.Language.AvailableLanguages[code] + ' (' + code + ')', code ) ;
  46              }
  47              oCombo.value = editorInstance.Language.ActiveLanguage.Code ;
  48          }    
  49          
  50  		function AddComboOption(combo, optionText, optionValue)
  51          {
  52              var oOption = document.createElement("OPTION") ;
  53          
  54              combo.options.add(oOption) ;
  55          
  56              oOption.innerHTML = optionText ;
  57              oOption.value     = optionValue ;
  58              
  59              return oOption ;
  60          }
  61          
  62  		function ChangeLanguage( languageCode )
  63          {
  64              window.location.href = window.location.pathname + "?Lang=" + languageCode ;
  65          }
  66          </script>
  67          </head>
  68      <body>
  69          <h1>FCKeditor - AFP - Sample 2</h1>
  70          This sample shows the editor in all its available languages.
  71          <hr>
  72          <table cellpadding="0" cellspacing="0" border="0">
  73              <tr>
  74                  <td>
  75                      Select a language:&nbsp;
  76                  </td>
  77                  <td>
  78                      <select id="cmbLanguages" onchange="ChangeLanguage(this.value);">
  79                      </select>
  80                  </td>
  81              </tr>
  82          </table>
  83          <br>
  84          <form action="sampleposteddata.afp" method="post" target="_blank">
  85  <%
  86  
  87              sBasePath="../../../fckeditor/"                        && Change this to your local path
  88      
  89              oFCKeditor = CREATEOBJECT("FCKeditor")
  90              oFCKeditor.fckeditor("FCKeditor1")
  91  
  92              lcLanguage=""                                        && Initialize Variable
  93              lcLanguage=request.querystring("Lang")                && Request Parameter
  94              lcLanguage=oFCKeditor.StripAttacks(lcLanguage)        && Remove special escape characters
  95              IF EMPTY(lcLanguage)                            
  96                  oFCKeditor.aconfig[1,1]="AutoDetectLanguage"
  97                  oFCKeditor.aconfig[1,2]="true"
  98                  oFCKeditor.aconfig[2,1]="DefaultLanguage"
  99                  oFCKeditor.aconfig[2,2]="en"
 100              ELSE
 101                  oFCKeditor.aconfig[1,1]="AutoDetectLanguage"
 102                  oFCKeditor.aconfig[1,2]="false"
 103                  oFCKeditor.aconfig[2,1]="DefaultLanguage"
 104                  oFCKeditor.aconfig[2,2]=lcLanguage
 105              ENDIF
 106  
 107              lcText=[This is some <strong>sample text</strong>. You are using ]
 108              lcText=lcText+[<a href='http://www.fckeditor.net/'>FCKeditor</a>.]
 109  
 110              oFCKeditor.BasePath    = sBasePath 
 111              oFCKeditor.cValue    = lcText
 112  
 113              ? oFCKeditor.Create() 
 114  
 115  %>
 116              <br>
 117              <input type="submit" value="Submit">
 118          </form>
 119      </body>
 120  </html>


Généré le : Sun Feb 25 15:28:05 2007 par Balluche grâce à PHPXref 0.7