<?php
//session
session_start();
include ("connect.php");
$username = $_SESSION['staff'];

if($_SESSION['staff']!= null)
{
?>

<html>
<head>
<title>Daily Bookstore - Management System</title>
<!--include css file-->
<link href="bookstaff.css" rel="stylesheet" type="text/css"/>
</head>

<body>

<?php
include ("stafffunctionbar.php");
?>

<div id="mainpage">
<table align="center" width="70%" border="0">
<caption><img src="Picture/toolbox.gif"/>Daily Bookstore Management System - Home Page</caption>

<tr>
<td colspan="4"><hr/></td>
</tr>

<tr>
<th colspan="4">Welcome to Daily bookstore management system. This main page will guide you how to use this system.</th>
</tr>

<tr>
<td colspan="4"><hr/></td>
</tr>

<tr>
<td align="center" height="25%"><a href="home.php"><img src="Picture/toolbox.gif" width="50" height="50" alt="main menu"></a></td>
<td align="center" height="25%"><a href="book.php"><img src="Picture/book.gif" width="50" height="50" alt="manage book"></a></td>
<?php
if(($_SESSION['staff_level']=='IT Staff')||($_SESSION['staff_level']=='IT Staff')){;
?>
<td align="center" height="25%"><a href="leavemain.php"><img src="Picture/leave.gif" width="50" height="50" alt="laeve"></a></td>
<?php
}else{
echo "<td align='center' height='25%'><a href='addleave.php'><img src='Picture/leave.gif' width='50' height='50' alt='laeve'></a></td>";
}
?>
<td align="center" height="25%"><a href="event.php"><img src="Picture/event.gif" width="50" height="50" alt="manage event"></a></td>
</tr>

<tr>
<td width='25%' align="center"><a href="home.php">Menu</td>
<td width='25%' align="center"><a href="book.php">Book</td>
<?php
if(($_SESSION['staff_level']=='IT Staff')||($_SESSION['staff_level']=='IT Staff')){;
?>
<td width='25%' align="center"><a href="leavemain.php">Leave</td>
<?php
}else{
echo "<td width='25%' align='center'><a href='addleave.php'>Leave</td>";
}
?>
<td width='25%' align="center"><a href="event.php">Event</td>
</tr>

<tr>
<td colspan="4"><hr/></td>
</tr>
<?php
if(($_SESSION['staff_level']=='IT Staff')||($_SESSION['staff_level']=='IT Staff')){;
?>
<tr>
<td align="center" height="25%"><a href="viewmessage.php"><img src="Picture/message.gif" width="50" height="50" alt="Customer Comment"></a></td>
<td align="center" height="25%"><a href="memlist.php"><img src="Picture/member.gif" width="50" height="50" alt="manage member"></a></td>
<td align="center" height="25%"><a href="stafflist.php"><img src="Picture/admin.gif" width="50" height="50" alt="admin control"></a></td>
<td align="center" height="25%"><a href="customerinformation.php"><img src="Picture/list.gif" width="50" height="50" alt="customer control"></a></td>
</tr>

<tr>
<td width='25%' align="center"><a href="viewmessage.php">Comment</td>
<td width='25%' align="center"><a href="memlist.php">Member</td>
<td width='25%' align="center"><a href="stafflist.php">Admin</td>
<td width='25%' align="center"><a href="customerinformation.php">Customer</td>
</tr>

<tr>
<td colspan="4"><hr/></td>
</tr>

<tr>
<td align="center" height="25%"><a href="supplierlist.php"><img src="Picture/supplier.gif" width="50" height="50" alt="supplier control"></a></td>
<td align="center" height="25%"><a href="salarymain.php"><img src="Picture/salary.gif" width="50" height="50" alt="salary"></a></td>
<td align="center" height="25%"><a href="bill.php"><img src="Picture/bill.gif" width="50" height="50" alt="manage bill"></a></td>
<td align="center" height="25%"><br/></td>
</tr>

<tr>
<td width='25%' align="center"><a href="supplierlist.php">Supplier</td>
<td width='25%' align="center"><a href="salarymain.php">Salary</td>
<td width='25%' align="center"><a href="bill.php">Bill</td>

<td width='25%' align="center"><br/></td>
</tr>

<?php
}else{
}
?>
</table>
</div>
<hr/>

<center>
<div id="bottom">
<br/>
Copyright &#169; with Tian Tian Bookstore 2011. All Rights Reserved.
<br/>
Website:<a href="../bookstore" target="_blank">www.dailybook.com.my
</div>
</center>

</body>
</html>

<?php
}
else
{
	echo "<script language='javascript'>alert ('Only authorised user can visit this page!')</script>";
	echo "<script language='javascript'>window.location='index.php'</script>";
}
?>