Ticket #2142: 2142_2.patch

File 2142_2.patch, 12.6 KB (added by Wojciech Olchawa, 16 years ago)

Patch proposal

  • _samples/html/sample01.html

     
    3737                This sample displays a normal HTML form with an FCKeditor with full features enabled.
    3838        </div>
    3939        <hr />
    40         <form action="sampleposteddata.php" method="post" target="_blank">
     40        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    4141                <script type="text/javascript">
    4242<!--
    4343// Automatically calculates the editor base path based on the _samples directory.
  • _samples/html/sample02.html

     
    5252                It uses the "ReplaceTextarea" command to create the editor.
    5353        </div>
    5454        <hr />
    55         <form action="sampleposteddata.php" method="post" target="_blank">
     55        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    5656                <div>
    5757                        <textarea name="FCKeditor1" rows="10" cols="80" style="width: 100%; height: 200px">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://www.fckeditor.net/"&gt;FCKeditor&lt;/a&gt;.&lt;/p&gt;</textarea>
    5858                </div>
  • _samples/html/sample03.html

     
    105105                </tr>
    106106        </table>
    107107        <br />
    108         <form action="sampleposteddata.php" method="post" target="_blank">
     108        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    109109                <script type="text/javascript">
    110110<!--
    111111// Automatically calculates the editor base path based on the _samples directory.
  • _samples/html/sample04.html

     
    6565                </tr>
    6666        </table>
    6767        <br />
    68         <form action="sampleposteddata.php" method="post" target="_blank">
     68        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    6969                <script type="text/javascript">
    7070<!--
    7171// Automatically calculates the editor base path based on the _samples directory.
  • _samples/html/sample05.html

     
    7171                </tr>
    7272        </table>
    7373        <br />
    74         <form action="sampleposteddata.php" method="post" target="_blank">
     74        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    7575                <script type="text/javascript">
    7676<!--
    7777// Automatically calculates the editor base path based on the _samples directory.
  • _samples/html/sample06.html

     
    4545                </ul>
    4646        </div>
    4747        <hr />
    48         <form action="sampleposteddata.php" method="post" target="_blank">
     48        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    4949                <script type="text/javascript">
    5050<!--
    5151// Automatically calculates the editor base path based on the _samples directory.
  • _samples/html/sample07.html

     
    3737                to &lt;/HTML&gt;).
    3838        </div>
    3939        <hr />
    40         <form action="sampleposteddata.php" method="post" target="_blank">
     40        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    4141                <script type="text/javascript">
    4242<!--
    4343// Automatically calculates the editor base path based on the _samples directory.
  • _samples/html/sample08.html

     
    148148                at runtime.
    149149        </div>
    150150        <hr />
    151         <form action="sampleposteddata.php" method="post" target="_blank">
     151        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    152152                <script type="text/javascript">
    153153<!--
    154154// Automatically calculates the editor base path based on the _samples directory.
  • _samples/html/sample09.html

     
    5757                in the JavaScript API.
    5858        </div>
    5959        <hr />
    60         <form action="sampleposteddata.php" method="post" target="_blank">
     60        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    6161                Normal text field:<br />
    6262                <input name="NormaText" value="Plain Text" />
    6363                <br />
  • _samples/html/sample10.html

     
    3939        <hr />
    4040        <div id="xToolbar"></div>
    4141        <hr />
    42         <form action="sampleposteddata.php" method="post" target="_blank">
     42        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    4343                Normal text field:<br />
    4444                <input name="NormaText" value="Plain Text" />
    4545                <br />
  • _samples/html/sample11_frame.html

     
    2929        <script type="text/javascript" src="../../fckeditor.js"></script>
    3030</head>
    3131<body>
    32         <form action="sampleposteddata.php" method="post" target="_blank">
     32        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    3333                Normal text field:<br />
    3434                <input name="NormaText" value="Plain Text" />
    3535                <br />
  • _samples/html/sample12.html

     
    7676                </tr>
    7777        </table>
    7878        <br />
    79         <form action="sampleposteddata.php" method="post" target="_blank">
     79        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    8080                <script type="text/javascript">
    8181<!--
    8282// Automatically calculates the editor base path based on the _samples directory.
  • _samples/html/sample13.html

     
    125125                operations so it will work even if the internal implementation changes.
    126126        </div>
    127127        <hr />
    128         <form action="sampleposteddata.php" method="post" target="_blank" onsubmit="PrepareSave();">
     128        <form action="../php/sampleposteddata.php" method="post" target="_blank" onsubmit="PrepareSave();">
    129129                <div id="Textarea">
    130130                        <input type="button" value="Switch to FCKeditor" onclick="Toggle()" />
    131131                        <br />
  • _samples/html/sample14.html

     
    3939                or the "style" attribute, are avoided.
    4040        </div>
    4141        <hr />
    42         <form action="sampleposteddata.php" method="post" target="_blank">
     42        <form action="../php/sampleposteddata.php" method="post" target="_blank">
    4343                <script type="text/javascript">
    4444<!--
    4545// Automatically calculates the editor base path based on the _samples directory.
  • _samples/html/sampleposteddata.html

     
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    2 <!--
    3  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
    4  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
    5  *
    6  * == BEGIN LICENSE ==
    7  *
    8  * Licensed under the terms of any of the following licenses at your
    9  * choice:
    10  *
    11  *  - GNU General Public License Version 2 or later (the "GPL")
    12  *    http://www.gnu.org/licenses/gpl.html
    13  *
    14  *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
    15  *    http://www.gnu.org/licenses/lgpl.html
    16  *
    17  *  - Mozilla Public License Version 1.1 or later (the "MPL")
    18  *    http://www.mozilla.org/MPL/MPL-1.1.html
    19  *
    20  * == END LICENSE ==
    21  *
    22  * This page lists the data posted by a form. It uses the URL (GET data),
    23  * so it's limited to 2KB of data.
    24 -->
    25 <html xmlns="http://www.w3.org/1999/xhtml">
    26 <head>
    27         <title>FCKeditor - Samples - Posted Data</title>
    28         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    29         <meta name="robots" content="noindex, nofollow" />
    30         <link href="../sample.css" rel="stylesheet" type="text/css" />
    31 </head>
    32 <body>
    33         <h1>
    34                 FCKeditor - Samples - Posted Data
    35         </h1>
    36         <div>
    37                 This page lists all data posted by the form. It uses the "QueryString" to search
    38                 for data submitted using the "GET" method, so it is limited to 2KB.
    39         </div>
    40         <hr />
    41         <table width="100%" border="1" cellpadding="3" style="border-color: #999999; border-collapse: collapse;">
    42                 <tr style="font-weight: bold; color: #dddddd; background-color: #999999">
    43                         <td style="white-space: nowrap;">
    44                                 Field</td>
    45                         <td>
    46                                 Value</td>
    47                 </tr>
    48                 <script type="text/javascript">
    49 <!--
    50 
    51 function HTMLEncode( text )
    52 {
    53         text = text.replace(/&/g, "&amp;") ;
    54         text = text.replace(/"/g, "&quot;") ;
    55         text = text.replace(/</g, "&lt;") ;
    56         text = text.replace(/>/g, "&gt;") ;
    57         text = text.replace(/'/g, "&#39;") ;
    58 
    59         return text ;
    60 }
    61 
    62 var aParams = document.location.search.substr(1).split('&') ;
    63 
    64 for ( i = 0 ; i < aParams.length ; i++ )
    65 {
    66         var aParam = aParams[i].split('=') ;
    67         var sParamName  = aParam[0] ;
    68         var sParamValue = aParam[1] ;
    69 
    70         document.write( '<tr>' ) ;
    71         document.write( '<td valign="top" style="white-space: nowrap;">' + sParamName + '</td>' ) ;
    72         document.write( '<td style="width: 100%;"><pre>' + HTMLEncode( decodeURIComponent( sParamValue.replace( /\+/g, ' ' ) ) ) + '</pre></td>' ) ;
    73         document.write( '</tr>' ) ;
    74 }
    75 
    76 //-->
    77                 </script>
    78         </table>
    79 </body>
    80 </html>
  • _samples/html/sampleposteddata.php

     
    1 <?php
    2 /*
    3  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
    4  * Copyright (C) 2003-2008 Frederico Caldeira Knabben
    5  *
    6  * == BEGIN LICENSE ==
    7  *
    8  * Licensed under the terms of any of the following licenses at your
    9  * choice:
    10  *
    11  *  - GNU General Public License Version 2 or later (the "GPL")
    12  *    http://www.gnu.org/licenses/gpl.html
    13  *
    14  *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
    15  *    http://www.gnu.org/licenses/lgpl.html
    16  *
    17  *  - Mozilla Public License Version 1.1 or later (the "MPL")
    18  *    http://www.mozilla.org/MPL/MPL-1.1.html
    19  *
    20  * == END LICENSE ==
    21  *
    22  * This page lists the data posted by a form.
    23  */
    24 ?>
    25 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    26 <html>
    27         <head>
    28                 <title>FCKeditor - Samples - Posted Data</title>
    29                 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    30                 <meta name="robots" content="noindex, nofollow">
    31                 <link href="../sample.css" rel="stylesheet" type="text/css" />
    32         </head>
    33         <body>
    34                 <h1>FCKeditor - Samples - Posted Data</h1>
    35                 This page lists all data posted by the form.
    36                 <hr>
    37                 <table width="100%" border="1" cellspacing="0" bordercolor="#999999">
    38                         <tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
    39                                 <td nowrap>Field Name&nbsp;&nbsp;</td>
    40                                 <td>Value</td>
    41                         </tr>
    42 <?php
    43 
    44 if ( isset( $_POST ) )
    45    $postArray = &$_POST ;                       // 4.1.0 or later, use $_POST
    46 else
    47    $postArray = &$HTTP_POST_VARS ;      // prior to 4.1.0, use HTTP_POST_VARS
    48 
    49 foreach ( $postArray as $sForm => $value )
    50 {
    51         if ( get_magic_quotes_gpc() )
    52                 $postedValue = htmlspecialchars( stripslashes( $value ) ) ;
    53         else
    54                 $postedValue = htmlspecialchars( $value ) ;
    55 
    56 ?>
    57                         <tr>
    58                                 <td valign="top" nowrap><b><?=$sForm?></b></td>
    59                                 <td width="100%" style="white-space:pre"><?=$postedValue?></td>
    60                         </tr>
    61 <?php
    62 }
    63 ?>
    64                 </table>
    65         </body>
    66 </html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy