| 1 | <?php |
|---|
| 2 | if (isset($_POST['message'])) { |
|---|
| 3 | $working = $_POST['working']; |
|---|
| 4 | $message = $_POST['message']; |
|---|
| 5 | |
|---|
| 6 | $writeme=fopen("$working","w"); |
|---|
| 7 | fputs($writeme, stripslashes($message)); |
|---|
| 8 | fclose($writeme); |
|---|
| 9 | |
|---|
| 10 | header("Location: /content/index.php"); |
|---|
| 11 | } |
|---|
| 12 | ?> |
|---|
| 13 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
|---|
| 14 | <head> |
|---|
| 15 | <style type="text/css" title="Default" media="all">@import "/c/admin.css";</style> |
|---|
| 16 | |
|---|
| 17 | <!--------------------------------------:noTabs=true:tabSize=2:indentSize=2:-- |
|---|
| 18 | -- Xinha example usage. This file shows how a developer might make use of |
|---|
| 19 | -- Xinha, it forms the primary example file for the entire Xinha project. |
|---|
| 20 | -- This file can be copied and used as a template for development by the |
|---|
| 21 | -- end developer who should simply removed the area indicated at the bottom |
|---|
| 22 | -- of the file to remove the auto-example-generating code and allow for the |
|---|
| 23 | -- use of the file as a boilerplate. |
|---|
| 24 | -- |
|---|
| 25 | -- $HeadURL: http://svn.xinha.python-hosting.com/trunk/examples/full_example-body.html $ |
|---|
| 26 | -- $LastChangedDate: 2005-07-28 02:43:19 +1200 (Thu, 28 Jul 2005) $ |
|---|
| 27 | -- $LastChangedRevision: 287 $ |
|---|
| 28 | -- $LastChangedBy: gocher $ |
|---|
| 29 | ---------------------------------------------------------------------------> |
|---|
| 30 | |
|---|
| 31 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | <script type="text/javascript"> |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | _editor_url = "/js/xinha/"; |
|---|
| 42 | _editor_lang = "en"; |
|---|
| 43 | </script> |
|---|
| 44 | |
|---|
| 45 | <!-- Load up the actual editor core --> |
|---|
| 46 | <script type="text/javascript" src="/js/xinha/htmlarea.js"></script> |
|---|
| 47 | |
|---|
| 48 | <script type="text/javascript"> |
|---|
| 49 | xinha_editors = null; |
|---|
| 50 | xinha_init = null; |
|---|
| 51 | xinha_config = null; |
|---|
| 52 | xinha_plugins = null; |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | xinha_init = xinha_init ? xinha_init : function() |
|---|
| 56 | { |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | xinha_plugins = xinha_plugins ? xinha_plugins : |
|---|
| 64 | [ |
|---|
| 65 | 'CharacterMap', |
|---|
| 66 | 'ContextMenu', |
|---|
| 67 | 'FullScreen', |
|---|
| 68 | 'ListType', |
|---|
| 69 | 'SpellChecker', |
|---|
| 70 | 'Stylist', |
|---|
| 71 | 'SuperClean', |
|---|
| 72 | 'TableOperations', |
|---|
| 73 | 'ImageManager', |
|---|
| 74 | 'CSS' |
|---|
| 75 | |
|---|
| 76 | ]; |
|---|
| 77 | |
|---|
| 78 | |
|---|
| 79 | if(!HTMLArea.loadPlugins(xinha_plugins, xinha_init)) return; |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | |
|---|
| 83 | |
|---|
| 84 | |
|---|
| 85 | |
|---|
| 86 | xinha_editors = xinha_editors ? xinha_editors : |
|---|
| 87 | [ |
|---|
| 88 | 'myTextArea', |
|---|
| 89 | ]; |
|---|
| 90 | |
|---|
| 91 | |
|---|
| 92 | |
|---|
| 93 | |
|---|
| 94 | |
|---|
| 95 | |
|---|
| 96 | |
|---|
| 97 | |
|---|
| 98 | |
|---|
| 99 | |
|---|
| 100 | |
|---|
| 101 | |
|---|
| 102 | |
|---|
| 103 | |
|---|
| 104 | xinha_config = xinha_config ? xinha_config() : new HTMLArea.Config(); |
|---|
| 105 | |
|---|
| 106 | |
|---|
| 107 | |
|---|
| 108 | |
|---|
| 109 | |
|---|
| 110 | |
|---|
| 111 | |
|---|
| 112 | |
|---|
| 113 | |
|---|
| 114 | |
|---|
| 115 | |
|---|
| 116 | |
|---|
| 117 | |
|---|
| 118 | |
|---|
| 119 | |
|---|
| 120 | |
|---|
| 121 | |
|---|
| 122 | |
|---|
| 123 | xinha_editors = HTMLArea.makeEditors(xinha_editors, xinha_config, xinha_plugins); |
|---|
| 124 | |
|---|
| 125 | |
|---|
| 126 | |
|---|
| 127 | |
|---|
| 128 | |
|---|
| 129 | |
|---|
| 130 | |
|---|
| 131 | |
|---|
| 132 | |
|---|
| 133 | |
|---|
| 134 | |
|---|
| 135 | |
|---|
| 136 | |
|---|
| 137 | |
|---|
| 138 | |
|---|
| 139 | |
|---|
| 140 | |
|---|
| 141 | HTMLArea.startEditors(xinha_editors); |
|---|
| 142 | } |
|---|
| 143 | |
|---|
| 144 | window.onload = xinha_init; |
|---|
| 145 | |
|---|
| 146 | |
|---|
| 147 | |
|---|
| 148 | |
|---|
| 149 | |
|---|
| 150 | |
|---|
| 151 | |
|---|
| 152 | if(typeof Stylist != 'undefined') |
|---|
| 153 | { |
|---|
| 154 | |
|---|
| 155 | |
|---|
| 156 | config.stylistLoadStylesheet(document.location.href.replace(/[^\/]*\.html/, 'stylist.css')); |
|---|
| 157 | |
|---|
| 158 | |
|---|
| 159 | config.stylistLoadStyles('p.red_text { color:red }'); |
|---|
| 160 | } |
|---|
| 161 | </script> |
|---|
| 162 | <link type="text/css" rel="stylesheet" title="blue-look" href="/js/xinha/skins/blue-look/skin.css" /> <!-- |
|---|
| 163 | <link type="text/css" rel="alternate stylesheet" title="green-look" href="../skins/green-look/skin.css" /> |
|---|
| 164 | <link type="text/css" rel="alternate stylesheet" title="xp-blue" href="../skins/xp-blue/skin.css" /> |
|---|
| 165 | <link type="text/css" rel="alternate stylesheet" title="xp-green" href="../skins/xp-green/skin.css" /> |
|---|
| 166 | <link type="text/css" rel="alternate stylesheet" title="inditreuse" href="../skins/inditreuse/skin.css" /> |
|---|
| 167 | <link type="text/css" rel="alternate stylesheet" title="blue-metallic" href="../skins/blue-metallic/skin.css" /--> |
|---|
| 168 | </head> |
|---|
| 169 | <body> |
|---|
| 170 | <form id="editors_here" method="post" action="file:///Z|/sites/coa/www/content/foo.php"> |
|---|
| 171 | <textarea id="myTextArea" name="message" rows="10" cols="90" style="width:99%;"> |
|---|
| 172 | <?php |
|---|
| 173 | $s=file($working); |
|---|
| 174 | for ($i=0; $i<sizeof($s);$i++){ |
|---|
| 175 | // echo htmlentities($s[$i]); |
|---|
| 176 | echo $s[$i]; |
|---|
| 177 | } |
|---|
| 178 | ?> |
|---|
| 179 | </textarea> |
|---|
| 180 | <input type="hidden" value="<?php echo $working; ?>" name="working"><br /> |
|---|
| 181 | <input type="submit" value="Submit Changes"> |
|---|
| 182 | <input style="margin-left: 500px;" type="button" value="Cancel" onclick="history.go(-1); return false;"> |
|---|
| 183 | </form> |
|---|
| 184 | |
|---|
| 185 | |
|---|
| 186 | </body> |
|---|
| 187 | </html> |
|---|