<?
if (isset($_POST['submit']))
{
$new_text = $_POST['text'];
file_put_contents('index.html', $new_text);
}
$text = file_get_contents('index.html');
?>
<form method='post' action='admin.php'>
<textarea name='text' id='text'><?=$text?></textarea>
<input type='submit' name='submit' value='Сохранить' />
</form>
<!-- TinyMCE -->
<script type="text/javascript" src="/js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
language: "ru",
editor_deselector : "mceNoEditor",
convert_urls : false,
width: "100%",
height: "375px"
});
</script>
<!-- /TinyMCE -->