array ("request", "string", ""), "texte" => array ("post", "string", ""), "save" => array ("post", "string", ""), "saveret" => array ("post", "string", ""), "cancel" => array ("post", "string", ""), "R" => array ("request", "string", ""), ); getFields($fields); $editing=false; $editfile=ssla($editfile); $texte=ssla($texte); $R=$bro->convertabsolute($R,1); $p=$bro->GetPrefs(); if (isset($cancel) && $cancel) { include("bro_main.php"); exit(); } if (isset($saveret) && $saveret) { $editing=true; // Thanks to this, we bring you back to the EDIT form if the CSRF is invalid. // Allows you to re-submit // FIXME - doesn't work /* $csrf_check=false; if (count($_POST) && !defined("NOCSRF")) { if (csrf_check()<=0) { $csrf_check = true; } }*/ if ($bro->save($editfile,$R,$texte)) { $msg->raise("INFO", "bro", _("Your file %s has been saved")." (".format_date(_('%3$d-%2$d-%1$d %4$d:%5$d'),date("Y-m-d H:i:s")).")", $editfile); include("bro_main.php"); exit(); } } if (isset($save) && $save) { if ($bro->save($editfile,$R,$texte)) { $msg->raise("INFO", "bro", _("Your file %s has been saved")." (".format_date(_('%3$d-%2$d-%1$d %4$d:%5$d'),date("Y-m-d H:i:s")).")", $editfile); } } $addhead['css'][]=''; $addhead['js'][]=''; include_once("head.php"); ?>
msg_html_all(); ?>