4
# FCKeditor - The text editor for Internet - http://www.fckeditor.net
5
# Copyright (C) 2003-2007 Frederico Caldeira Knabben
9
# Licensed under the terms of any of the following licenses at your
12
# - GNU General Public License Version 2 or later (the "GPL")
13
# http://www.gnu.org/licenses/gpl.html
15
# - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
16
# http://www.gnu.org/licenses/lgpl.html
18
# - Mozilla Public License Version 1.1 or later (the "MPL")
19
# http://www.mozilla.org/MPL/MPL-1.1.html
23
# This page lists the data posted by a form.
26
## START: Hack for Windows (Not important to understand the editor code... Perl specific).
28
chdir(GetScriptPath($0));
36
if($www_server_os eq "") { $www_server_os= $ENV{'OS'}; }
38
if($ENV{'SERVER_SOFTWARE'} =~ /AnWeb|Omni|IIS\//i) { $www_server_os= 'win'; }
40
if($ENV{'WINDIR'} ne "") { $www_server_os= 'win'; }
41
if($www_server_os=~ /win/i) { return(1); }
47
if($path =~ /[\:\/\\]/) { $path =~ s/(.*?)[\/\\][^\/\\]+$/$1/; } else { $path = '.'; }
52
require '../../fckeditor.pl';
54
if($ENV{'REQUEST_METHOD'} eq "POST") {
55
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
57
$buffer = $ENV{'QUERY_STRING'};
59
@pairs = split(/&/,$buffer);
60
foreach $pair (@pairs) {
61
($name,$value) = split(/=/,$pair);
63
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
65
$value =~ s/\r\n/\n/g;
66
$FORM{$name} .= "\0" if(defined($FORM{$name}));
67
$FORM{$name} .= $value;
70
print "Content-type: text/html\n\n";
72
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
76
<title>FCKeditor - Samples - Posted Data</title>
77
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
78
<meta name="robots" content="noindex, nofollow">
79
<link href="../sample.css" rel="stylesheet" type="text/css" />
82
<h1>FCKeditor - Samples - Posted Data</h1>
83
This page lists all data posted by the form.
85
<table width="100%" border="1" cellspacing="0" bordercolor="#999999">
86
<tr style="FONT-WEIGHT: bold; COLOR: #dddddd; BACKGROUND-COLOR: #999999">
87
<td nowrap>Field Name </td>
92
foreach $key (keys %FORM) {
93
$postedValue = &specialchar_cnv($FORM{$key});
96
<td valign="top" nowrap><b>$key</b></td>
97
<td width="100%">$postedValue</td>
101
print <<"_HTML_TAG_";