<?php
//session
session_start();
?>

<html>
<head>
<title>Daily Bookstore - Management System</title>
<!--include css file-->
<link href="bookstaff.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="calendar.js"></script>
<script type="text/javascript" src="calendar-setup.js"></script>
<script type="text/javascript" src="calendar-en.js"></script>
<style type="text/css"> @import url("calendar-win2k-cold-1.css"); </style>
</head>

<body>

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

<center>
<h2>Daily Bookstore Management - Manage Event</h2>
</center>

<div id="mainpage">
<table width="90%">
<tr>
<td width="15%" valign="top">
<fieldset style="margin:0 5 0 0">
<legend><img src="Picture/event.gif" width="30" height="30">Manage Event</legend>
<table>
<tr>
<td valign="top">
<a href="event.php"><img src="Picture/list.gif" width="30" height="30" alt="event list"><a href="event.php">Event List</a><br/>
<br/>
<a href="addEvent.php"><img src="Picture/add.gif" width="30" height="30" alt="add event"><a href="addEvent.php">Add Event</a><br/>
<br/>
</td>
</tr>
</table>
</fieldset>
</td>

<td width="75%">
<!--1st table-->
<table border="0" width="90%" align="center">

<tr>

<td>
<form name="form" method="POST" action="addeventaction.php" enctype="multipart/form-data">
<fieldset> 
<legend><img src="Picture/add.gif" width="30" height="30">Add New Event</legend>
	
<table width="100%">

<tr>
<br/>
<td valign="top">Event Image</td>
<td valign="top">
<input type="file" name="file" /> 
</td>
</tr>

<tr>
<td valign="top">Event Title</td>
<td valign="top" ><input type="text" size="50" maxlength="50" style="number" name="eventTitle"></td>
</tr>

<tr>
<td valign="top">Event Date</td>
<td valign="top" ><input type="text" id="cal-field-1" name="eventDate"/>
			<button type="submit" id="cal-button-1">Date</button>
			<script type="text/javascript">
			Calendar.setup({
			inputField : "cal-field-1",
			button : "cal-button-1",
			align : "Tr"
			});
			</script></td>
</tr>

<tr>
<td valign="top">Event Time</td>
<td valign="top" ><input type="text" size="15" maxlength="15" style="number" name="eventTime"></td>
</tr>

<tr>
<td valign="top">Event Description</td>
<td valign="top"><textarea name="eventDescription"  rows="10" cols="80" maxlength="100" style="font-family:times new roman" ></textarea></td>
</tr>

<tr>
<td valign="top">Event Location</td>
<td valign="top" ><input type="text" size="30" maxlength="30" name="eventLocation"></td></tr>

<tr>
<td colspan="2" align="center"><input type="button" name="Submit" value="Submit" onclick='submitcheck(eventDate.value,eventTime.value,eventLocation.value,eventTitle.value,eventDescription.value)'><input type="Reset" name="Reset"></td></tr>

</table>
</fieldset>
</form>
</td>
</tr>
</table>

</td>
</tr>
</table>
<script language="Javascript">
	function submitcheck(a,b,c,d,e){
	if((a=="")||(b=="")||(c=="")||(d="")||(e="")){
	alert("Please check your event information.");
	}else{
	this.form.submit();
	}
}
</script>
<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>