--- /dev/null
+#!/usr/bin/env python\r
+\r
+"""\r
+FCKeditor - The text editor for Internet - http://www.fckeditor.net\r
+Copyright (C) 2003-2008 Frederico Caldeira Knabben\r
+\r
+== BEGIN LICENSE ==\r
+\r
+Licensed under the terms of any of the following licenses at your\r
+choice:\r
+\r
+ - GNU General Public License Version 2 or later (the "GPL")\r
+ http://www.gnu.org/licenses/gpl.html\r
+\r
+ - GNU Lesser General Public License Version 2.1 or later (the "LGPL")\r
+ http://www.gnu.org/licenses/lgpl.html\r
+\r
+ - Mozilla Public License Version 1.1 or later (the "MPL")\r
+ http://www.mozilla.org/MPL/MPL-1.1.html\r
+\r
+== END LICENSE ==\r
+\r
+This page lists the data posted by a form.\r
+"""\r
+\r
+import cgi\r
+import os\r
+\r
+# Tell the browser to render html\r
+print "Content-Type: text/html"\r
+print ""\r
+\r
+try:\r
+ # Create a cgi object\r
+ form = cgi.FieldStorage()\r
+except Exception, e:\r
+ print e\r
+\r
+# Document header\r
+print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\r
+<html>\r
+ <head>\r
+ <title>FCKeditor - Samples - Posted Data</title>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
+ <meta name="robots" content="noindex, nofollow">\r
+ <link href="../sample.css" rel="stylesheet" type="text/css" />\r
+ </head>\r
+ <body>\r
+"""\r
+\r
+# This is the real work\r
+print """\r
+ <h1>FCKeditor - Samples - Posted Data</h1>\r
+ This page lists all data posted by the form.\r
+ <hr>\r
+ <table border="1" cellspacing="0" id="outputSample">\r
+ <colgroup><col width="80"><col></colgroup>\r
+ <thead>\r
+ <tr>\r
+ <th>Field Name</th>\r
+ <th>Value</th>\r
+ </tr>\r
+ </thead>\r
+"""\r
+for key in form.keys():\r
+ try:\r
+ value = form[key].value\r
+ print """\r
+ <tr>\r
+ <th>%s</th>\r
+ <td><pre>%s</pre></td>\r
+ </tr>\r
+ """ % (key, value)\r
+ except Exception, e:\r
+ print e\r
+print "</table>"\r
+\r
+# For testing your environments\r
+print "<hr>"\r
+for key in os.environ.keys():\r
+ print "%s: %s<br>" % (key, os.environ.get(key, ""))\r
+print "<hr>"\r
+\r
+# Document footer\r
+print """\r
+ </body>\r
+</html>\r
+"""\r