Subversion Repositories Applications.papyrus

Rev

Rev 439 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 439 Rev 556
Line 86... Line 86...
86
			}
86
			}
87
		}
87
		}
88
	}
88
	}
Line 89... Line 89...
89
 
89
 
90
	// fetch fields
90
	// fetch fields
91
	if (!isset($_POST["previous"])) $previous = $this->page["id"];
-
 
92
	else $previous = $_POST["previous"];
91
	if (!$previous = $_POST["previous"]) $previous = $this->page["id"];
93
	if (!isset($_POST["body"])) $body = $this->page["body"];
-
 
94
	else $body = $_POST["body"];
-
 
Line 95... Line 92...
95
 
92
	if (!$body = $_POST["body"]) $body = $this->page["body"];
96
 
-
 
97
	// preview?
93
 
98
	if (!isset($_POST["submit"])) $_POST["submit"] = "";
94
	// preview?
99
	if ($_POST["submit"] == "Aperçu")
95
	if ($_POST["submit"] == "Aperçu")
100
	{
96
	{
101
		$output .=
97
		$output .=
Line 111... Line 107...
111
			$this->FormClose()."\n";
107
			$this->FormClose()."\n";
112
	}
108
	}
113
	else
109
	else
114
	{
110
	{
115
		// display form
111
		// display form
116
		if (isset($error))
112
		if ($error)
117
		{
113
		{
118
			if (!isset($output)) $output = '';
-
 
119
			$output .= "<div class=\"error\">$error</div>\n";
114
			$output .= "<div class=\"error\">$error</div>\n";
120
		}
115
		}
Line 121... Line 116...
121
 
116
 
122
		// append a comment?
117
		// append a comment?
123
		if (isset($_REQUEST["appendcomment"]))
118
		if ($_REQUEST["appendcomment"])
124
		{
119
		{
125
			$body = trim($body)."\n\n----\n\n--".$this->UserName()." (".strftime("%c").")";
120
			$body = trim($body)."\n\n----\n\n--".$this->UserName()." (".strftime("%c").")";
126
		}
-
 
127
 
121
		}
128
		if (!isset($output)) $output = '';
122
		require_once("ACeditor.buttonsBar.php");
129
		$output .=
123
		$output .=
130
			$this->FormOpen("edit").
124
			$this->FormOpen("edit").
131
			"<input type=\"hidden\" name=\"previous\" value=\"".$previous."\" />\n".
125
			"<input type=\"hidden\" name=\"previous\" value=\"".$previous."\" />\n".$ACbuttonsBar.
132
			"<textarea onkeydown=\"fKeyDown()\" name=\"body\" cols=\"60\" rows=\"40\" wrap=\"soft\" class=\"edit\">\n".
126
			"<textarea onkeydown=\"fKeyDown()\" name=\"body\" cols=\"60\" rows=\"40\" wrap=\"soft\" class=\"edit\">\n".
133
			htmlspecialchars($body).
127
			htmlspecialchars($body).
134
			"\n</textarea><br />\n".
128
			"\n</textarea><br />\n".
135
			($this->config["preview_before_save"] ? "" : "<input name=\"submit\" type=\"submit\" value=\"Sauver\" accesskey=\"s\" />\n").
129
			($this->config["preview_before_save"] ? "" : "<input name=\"submit\" type=\"submit\" value=\"Sauver\" accesskey=\"s\" />\n").