Added a logout button and fixed HTML in simplog.php with 'start_html' and 'end_html'

This commit is contained in:
2014-05-25 09:14:40 +02:00
parent be4b0a33ac
commit 64766c4ea7
3 changed files with 20 additions and 1 deletions

View File

@@ -3,6 +3,8 @@
// Include config file and other include-files
require "includes/config.php";
require "includes/dbconnect.php";
require "includes/htmlcode.php";
start_html("Simplog");
// Divide the posts into pages, N number of posts on every page
if (isset($_GET['page']))
@@ -44,5 +46,5 @@ for ($i=1; $i<=$total_posts; $i++)
// Close MySQL link
require "includes/dbclose.php";
end_html();
?>

View File

@@ -11,6 +11,9 @@ include "../includes/login.inc";
<p>
<a href="edit.php">Edit existing post</a>
</p>
<p>
<a href="logout.php">Logout</a>
</p>
<?php
end_html();

14
user/logout.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
require "../includes/htmlcode.php";
start_html("simplog user interface");
setcookie("session", "", time()-3600);
?>
<p>
You have been logged out succesfully!<br />
<a href="../simplog.php">Return to simplog</a>
</p>
<?php
end_html();
?>