fixed links
This commit is contained in:
parent
100ba92888
commit
7f35822090
11
index.php
11
index.php
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
$password = '';
|
||||
$dir = '../../data/bbn';
|
||||
|
||||
if (!isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_PW'] != $password) {
|
||||
header('WWW-Authenticate: Basic realm="bbn"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
|
@ -32,12 +34,9 @@
|
|||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div><a href="bbn.php">View list</a> <a href="bbn.php?create=true">New note</a> | bbn</div>
|
||||
<div><a href="index.php">View list</a> <a href="index.php?create=true">New note</a> | bbn</div>
|
||||
<br>
|
||||
<?php
|
||||
|
||||
$dir = '../data';
|
||||
|
||||
if (isset($_POST['savebutton']))
|
||||
{
|
||||
$title = $_POST['title'];
|
||||
|
@ -62,7 +61,7 @@
|
|||
$title = $_GET['open'];
|
||||
$content = file_get_contents($dir . '/' . $title);
|
||||
|
||||
echo '<form action="bbn.php" method="POST">
|
||||
echo '<form action="index.php" method="POST">
|
||||
<div>
|
||||
<input name="title" value="' . $title . '">
|
||||
<!--<input type="submit" name="deletebutton" value="delete">-->
|
||||
|
@ -80,7 +79,7 @@
|
|||
while (($file = readdir($dh)) !== false) {
|
||||
if (str_ends_with($file, '.md'))
|
||||
{
|
||||
echo '<div><a href=bbn.php?open=' . urlencode($file) . '>' . $file .'</a></div>';
|
||||
echo '<div><a href=index.php?open=' . urlencode($file) . '>' . $file .'</a></div>';
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
|
|
Loading…
Reference in New Issue