88,10 → 88,14 |
} |
|
// fetch fields |
if (!$previous = $_POST["previous"]) $previous = $this->page["id"]; |
if (!$body = $_POST["body"]) $body = $this->page["body"]; |
if (!isset($_POST["previous"])) $previous = $this->page["id"]; |
else $previous = $_POST["previous"]; |
if (!isset($_POST["body"])) $body = $this->page["body"]; |
else $body = $_POST["body"]; |
|
|
// preview? |
if (!isset($_POST["submit"])) $_POST["submit"] = ""; |
if ($_POST["submit"] == "Aperçu") |
{ |
$output .= |
109,20 → 113,22 |
else |
{ |
// display form |
if ($error) |
if (isset($error)) |
{ |
if (!isset($output)) $output = ''; |
$output .= "<div class=\"error\">$error</div>\n"; |
} |
|
// append a comment? |
if ($_REQUEST["appendcomment"]) |
if (isset($_REQUEST["appendcomment"])) |
{ |
$body = trim($body)."\n\n----\n\n--".$this->UserName()." (".strftime("%c").")"; |
} |
require_once("ACeditor.buttonsBar.php"); |
|
if (!isset($output)) $output = ''; |
$output .= |
$this->FormOpen("edit"). |
"<input type=\"hidden\" name=\"previous\" value=\"".$previous."\" />\n".$ACbuttonsBar. |
"<input type=\"hidden\" name=\"previous\" value=\"".$previous."\" />\n". |
"<textarea onkeydown=\"fKeyDown()\" name=\"body\" cols=\"60\" rows=\"40\" wrap=\"soft\" class=\"edit\">\n". |
htmlspecialchars($body). |
"\n</textarea><br />\n". |