Ticket #6880: 6880.patch

File 6880.patch, 4.4 KB (added by Wiktor Walc, 13 years ago)
  • _samples/assets/_posteddata.php

     
     1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     2<?php
     3/*
     4Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
     5For licensing, see LICENSE.html or http://ckeditor.com/license
     6*/
     7?>
     8<html xmlns="http://www.w3.org/1999/xhtml">
     9<head>
     10        <title>Sample - CKEditor</title>
     11        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
     12        <link type="text/css" rel="stylesheet" href="sample.css" />
     13</head>
     14<body>
     15        <h1>
     16                CKEditor - Posted Data
     17        </h1>
     18        <table border="1" cellspacing="0" id="outputSample">
     19                <colgroup><col width="100" /></colgroup>
     20                <thead>
     21                        <tr>
     22                                <th>Field&nbsp;Name</th>
     23                                <th>Value</th>
     24                        </tr>
     25                </thead>
     26<?php
     27
     28if ( isset( $_POST ) )
     29        $postArray = &$_POST ;                  // 4.1.0 or later, use $_POST
     30else
     31        $postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS
     32
     33foreach ( $postArray as $sForm => $value )
     34{
     35        if ( get_magic_quotes_gpc() )
     36                $postedValue = htmlspecialchars( stripslashes( $value ) ) ;
     37        else
     38                $postedValue = htmlspecialchars( $value ) ;
     39
     40?>
     41                <tr>
     42                        <th style="vertical-align: top"><?php echo $sForm?></th>
     43                        <td><pre><?php echo $postedValue?></pre></td>
     44                </tr>
     45        <?php
     46}
     47?>
     48        </table>
     49        <div id="footer">
     50                <hr />
     51                <p>
     52                        CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
     53                </p>
     54                <p id="copy">
     55                        Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
     56                </p>
     57        </div>
     58</body>
     59</html>
  • _samples/sample_posteddata.php

     
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    2 <?php
    3 /*
    4 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
    5 For licensing, see LICENSE.html or http://ckeditor.com/license
    6 */
    7 ?>
    8 <html xmlns="http://www.w3.org/1999/xhtml">
    9 <head>
    10         <title>Sample - CKEditor</title>
    11         <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    12         <link type="text/css" rel="stylesheet" href="sample.css" />
    13 </head>
    14 <body>
    15         <h1>
    16                 CKEditor - Posted Data
    17         </h1>
    18         <table border="1" cellspacing="0" id="outputSample">
    19                 <colgroup><col width="100" /></colgroup>
    20                 <thead>
    21                         <tr>
    22                                 <th>Field&nbsp;Name</th>
    23                                 <th>Value</th>
    24                         </tr>
    25                 </thead>
    26 <?php
     1<?php /*
    272
    28 if ( isset( $_POST ) )
    29         $postArray = &$_POST ;                  // 4.1.0 or later, use $_POST
    30 else
    31         $postArray = &$HTTP_POST_VARS ; // prior to 4.1.0, use HTTP_POST_VARS
    323
    33 foreach ( $postArray as $sForm => $value )
    34 {
    35         if ( get_magic_quotes_gpc() )
    36                 $postedValue = htmlspecialchars( stripslashes( $value ) ) ;
    37         else
    38                 $postedValue = htmlspecialchars( $value ) ;
     4-------------------------------------------------------------------------------------------
     5  CKEditor - Posted Data
    396
    40 ?>
    41                 <tr>
    42                         <th style="vertical-align: top"><?php echo $sForm?></th>
    43                         <td><pre><?php echo $postedValue?></pre></td>
    44                 </tr>
    45         <?php
    46 }
    47 ?>
    48         </table>
    49         <div id="footer">
    50                 <hr />
    51                 <p>
    52                         CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
    53                 </p>
    54                 <p id="copy">
    55                         Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
    56                 </p>
    57         </div>
    58 </body>
    59 </html>
     7  We are sorry, but your Web server does not support the PHP language used in this script.
     8
     9  Please note that CKEditor can be used with any other server-side language than just PHP.
     10  To save the content created with CKEditor you need to read the POST data on the server
     11  side and write it to a file or a database.
     12
     13
     14  Copyright 2003-2010, CKSource - Frederico Knabben.
     15  All rights reserved.
     16-------------------------------------------------------------------------------------------
     17
     18
     19
     20
     21*/ include "assets/_posteddata.php"; ?>
     22 No newline at end of file
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy