Añadir 'blog.php'
This commit is contained in:
parent
03344f43dd
commit
107b0e3501
|
@ -0,0 +1,20 @@
|
|||
<?php include "blog_config.php"; if(isset($_GET["p"])){
|
||||
function notfound($errno, $errstr) {
|
||||
echo "Error!\nPost not found";
|
||||
}
|
||||
set_error_handler("notfound");
|
||||
header("Content-type: text/plain");
|
||||
echo $posts[$_GET["p"]][2];
|
||||
} else {
|
||||
header("Content-type: text/html");
|
||||
echo "<!DOCTYPE html><html><head><title>$title</title></head><body style='font-family:monospace'><h1>$title</h1>"
|
||||
$a=count($posts)-1;
|
||||
$ao=0;
|
||||
$next=$a+1;
|
||||
while($ao < count($posts)){
|
||||
if(strpos($posts[$r][1],"'")){$title=str_replace("'", "\\'", $posts[$a][1]);}else{$title=$posts[$a][1];}
|
||||
echo "<p><a href='?p=$next'>$title</a><br>".$posts[$a][0]."</p><br>";
|
||||
$a--; $ao++; $next--;
|
||||
}
|
||||
echo "<p><a href='https://tildegit.org/blog-soft'>Source code</a></p></body></html>";
|
||||
} ?>
|
Loading…
Reference in New Issue