Added a logout button and fixed HTML in simplog.php with 'start_html' and 'end_html'
This commit is contained in:
@@ -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();
|
||||
?>
|
||||
|
@@ -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
14
user/logout.php
Normal 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();
|
||||
?>
|
Reference in New Issue
Block a user