Ticket #2142: 2142.patch

File 2142.patch, 12.2 KB (added by Wojciech Olchawa, 11 years ago)
  • _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
     44if ( isset( $_POST ) )
     45   $postArray = &$_POST ;                       // 4.1.0 or later, use $_POST
     46else
     47   $postArray = &$HTTP_POST_VARS ;      // prior to 4.1.0, use HTTP_POST_VARS
     48
     49foreach ( $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>
  • _samples/html/sample10.html

     
    3939        <hr />
    4040        <div id="xToolbar"></div>
    4141        <hr />
    42         <form action="sampleposteddata.asp" method="post" target="_blank">
     42        <form action="sampleposteddata.php" method="post" target="_blank">
    4343                Normal text field:<br />
    4444                <input name="NormaText" value="Plain Text" />
    4545                <br />
  • _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.asp" method="post" target="_blank">
     40        <form action="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.asp" method="post" target="_blank">
     55        <form action="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/sample12.html

     
    7676                </tr>
    7777        </table>
    7878        <br />
    79         <form action="sampleposteddata.asp" method="post" target="_blank">
     79        <form action="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/sample03.html

     
    105105                </tr>
    106106        </table>
    107107        <br />
    108         <form action="sampleposteddata.asp" method="post" target="_blank">
     108        <form action="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/sample13.html

     
    125125                operations so it will work even if the internal implementation changes.
    126126        </div>
    127127        <hr />
    128         <form action="sampleposteddata.asp" method="post" target="_blank" onsubmit="PrepareSave();">
     128        <form action="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/sample04.html

     
    6565                </tr>
    6666        </table>
    6767        <br />
    68         <form action="sampleposteddata.asp" method="post" target="_blank">
     68        <form action="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.asp" method="post" target="_blank">
     74        <form action="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/sample14.html

     
    3939                or the "style" attribute, are avoided.
    4040        </div>
    4141        <hr />
    42         <form action="sampleposteddata.asp" method="post" target="_blank">
     42        <form action="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/sample06.html

     
    4545                </ul>
    4646        </div>
    4747        <hr />
    48         <form action="sampleposteddata.asp" method="post" target="_blank">
     48        <form action="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.asp" method="post" target="_blank">
     40        <form action="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.asp" method="post" target="_blank">
     151        <form action="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.asp" method="post" target="_blank">
     60        <form action="sampleposteddata.php" method="post" target="_blank">
    6161                Normal text field:<br />
    6262                <input name="NormaText" value="Plain Text" />
    6363                <br />
  • _samples/html/sample11_frame.html

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

     
    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.
    23 -->
    24 <html xmlns="http://www.w3.org/1999/xhtml">
    25 <head>
    26         <title>FCKeditor - Samples - Posted Data</title>
    27         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    28         <meta name="robots" content="noindex, nofollow" />
    29         <link href="../sample.css" rel="stylesheet" type="text/css" />
    30 </head>
    31 <body>
    32         <h1>
    33                 FCKeditor - Samples - Posted Data</h1>
    34         <div>
    35                 This page lists all data posted by the form.
    36         </div>
    37         <hr />
    38         <table width="100%" border="1" cellpadding="3" style="border-color: #999999; border-collapse: collapse;">
    39                 <tr style="font-weight: bold; color: #dddddd; background-color: #999999">
    40                         <td style="white-space: nowrap;">
    41                                 Field Name&nbsp;&nbsp;</td>
    42                         <td>
    43                                 Value</td>
    44                 </tr>
    45                 <% For Each sForm in Request.Form %>
    46                 <tr>
    47                         <td valign="top" style="white-space: nowrap;">
    48                                 <b>
    49                                         <%=sForm%>
    50                                 </b>
    51                         </td>
    52                         <td style="width: 100%;">
    53                                 <pre><%=ModifyForOutput( Request.Form(sForm) )%></pre>
    54                         </td>
    55                 </tr>
    56                 <% Next %>
    57         </table>
    58 </body>
    59 </html>
    60 <%
    61 
    62 ' This function is useful only for this sample page se whe can display the
    63 ' posted data accordingly. This processing is usually not done on real
    64 ' applications, where the posted data must be saved on a DB or file. In those
    65 ' cases, no processing must be done, and the data is saved as posted.
    66 Function ModifyForOutput( value )
    67 
    68         ModifyForOutput = Server.HTMLEncode( value )
    69 
    70 End Function
    71 
    72 %>
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy