<?
if ($_GET['file']=='new')
{
?>
<script>
//Some javascript to open a prompt window, outputting the returning result to the hidden file name field
</script>
<?
}
if (strlen($_POST['textarea'])>0)
{
//saves into $file
}
//loads the list fe the files present in this folder into an array : php.net/readdir
//loops into this array to echo a list of links in a <div> 'arranged ith css later) : php.net/foreach
?>
<div id='form'>
<? if (file_exists($_GET['file']))
//loads the contents of the file into the textarea
?>
<!--submit--!>
<!--create a new file button--!>
<!--hidden file name field--!>
</div>