<?php
/*
* @author Istvan Franko
* @copyright 2014
*/

//show the links in a table
echo "
<table border='0' align='center'  cellspacing='5' cellpadding='5' style='width:900px; margin-top:-38px;' >
<tr><ul>
<td  colspan='3' class=border text-align: center;'>
<li><a href='index.php' style='text-decoration:none'>Home</a></li></td>
<td colspan='3' class=border text-align: center;'>
<li><a href='catalogue.php' style='text-decoration:none'>Catalogue</a></li></td>
<td colspan='3' class=border text-align: center;'>
<li><a href='search.php' style='text-decoration:none'>Search</a></li></td>
<td colspan='3' class=border text-align: center;'>
<li><a href='feedback-form.php' style='text-decoration:none'>Feedback</a></li></td>
<td colspan='3' class=border text-align: center;'>
<li><a href='about-us.php' style='text-decoration:none'>About us</a></li></td>
";

//if any item in the cart display the go to cart link
if (sizeof($_SESSION['cart']) >= 1)
	{
	echo " 
	<td colspan='3' class=border text-align: center;'>
	<li><a href='cart-display.php' style='text-decoration:none'>Go to cart</a></li></td>";
	}

if (isset($_SESSION['loggedin']))
{
	if ($_SESSION['loggedin'] > 0)
		{
		echo " 
		<td colspan='3' class=border text-align: center;'>
		<li><a href='user-account.php' style='text-decoration:none'>My account</a></li></td>";
		}
	else 
		{
		echo " 
		<td colspan='3' class=border text-align: center;'>
		<li><a href='login-form.php' style='text-decoration:none'>Log-in</a></li></td>";
		}
}

echo "</ul></tr></table>";

?>