parent
7f35822090
commit
d28322e983
|
@ -34,7 +34,7 @@
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div><a href="index.php">View list</a> <a href="index.php?create=true">New note</a> | bbn</div>
|
<div><a accesskey="l" href="index.php">View list</a> <a accesskey="n" href="index.php?create=true">New note</a> | bbn</div>
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php
|
||||||
if (isset($_POST['savebutton']))
|
if (isset($_POST['savebutton']))
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
else if (isset($_POST['deletebutton']))
|
else if (isset($_POST['deletebutton']))
|
||||||
{
|
{
|
||||||
$title = $_POST['title'];
|
$title = $_POST['title'];
|
||||||
unlink($dir . '/' . $title);
|
rename($dir . '/' . $title, $dir . '/' . $title . '.del');
|
||||||
}
|
}
|
||||||
else if (isset($_GET['create']))
|
else if (isset($_GET['create']))
|
||||||
{
|
{
|
||||||
|
@ -64,13 +64,13 @@
|
||||||
echo '<form action="index.php" method="POST">
|
echo '<form action="index.php" method="POST">
|
||||||
<div>
|
<div>
|
||||||
<input name="title" value="' . $title . '">
|
<input name="title" value="' . $title . '">
|
||||||
<!--<input type="submit" name="deletebutton" value="delete">-->
|
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div>
|
<div>
|
||||||
<textarea autofocus name="content" spellcheck="false">' . $content . '</textarea>
|
<textarea autofocus name="content" spellcheck="false">' . $content . '</textarea>
|
||||||
</div>
|
</div>
|
||||||
<input type="submit" name="savebutton" value="save" accesskey="s">
|
<input type="submit" name="savebutton" value="save" accesskey="s">
|
||||||
|
<input accesskey="d" type="submit" name="deletebutton" value="delete">
|
||||||
</form>';
|
</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue