35 protected $textareaName = null;
42 protected $text = null;
50 if ($contents !==
false) {
51 $this->text = $contents;
53 e(
'cntopen',
'file', $this->filename);
72 $title = $this->caption;
73 $action = isset($this->plugin) ? $sn .
'?&' . $this->plugin :
$sn;
75 if (isset($_GET[
'xh_success'])) {
77 $message =
XH_message(
'success', $tx[
'message'][
'saved'], $filetype);
81 $button =
'<input type="submit" class="submit" value="' . $value .
'">';
82 $o =
'<h1>' . $this->caption .
'</h1>' . $message
83 .
'<form action="' .
$action .
'" method="post">' 84 .
'<textarea rows="25" cols="80" name="' . $this->textareaName
85 .
'" class="xh_file_edit">' 88 foreach ($this->params as $param => $value) {
89 $o .=
'<input type="hidden" name="' . $param .
'" value="' 92 $o .= $_XH_csrfProtection->tokenInput()
93 . $button .
'</form>';
111 $_XH_csrfProtection->check();
112 $this->text =
stsl($_POST[$this->textareaName]);
113 if ($this->save() !==
false) {
114 header(
'Location: ' .
CMSIMPLE_URL . $this->redir,
true, 303);
117 e(
'cntsave',
'file', $this->filename);
118 return $this->form();
foreach(XH_plugins() as $plugin) $_XH_csrfProtection
XH_message($type, $message)