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

session_start();
if (isset($_SESSION['adminlogin'])){
	//user in logen in. Show a message on the screen
} else {
	//redirect the user to the login form.
	session_destroy();
	header('Location: index.php');
}
?>

<html>

<head>
<title>Natty Notebooks Inc.</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>

<body>

<div id="container">

<div id="header">
	<! header picture in css >
</div>
	
<div id="navigation">
	<?php include 'admin-nav-bar.php'; ?>
</div>

<div id="aside">
	<!--Links for navigation-->
	<a href="admin.php"><p style="text-align:center">Back to list</a></p>		

	<br><fieldset style="width:85%"><legend>HELP</legend>
	<p>You can add a new product here.</p>
	<p>Please carefully fill out all required fields.</p>
	</fieldset><br>
</div>

<div id="content">

<br>
<fieldset style="width:90%"><legend>INSERT AN ITEM</legend>

<form action="insert.php" method="post">

Item name: <input type="text" size="50" name="ItemName"><br><br>
Item in Mbro: <input type="text" size="20" name="ItemInMbro"><span class="red"> -only numbers allowed</span><br><br>
Item in Stockton: <input type="text" size="20" name="ItemInStockton"><span class="red"> -only numbers allowed</span><br><br>
Item available: <input type="radio" name="ItemAvailable" value="1">Yes
				<input type="radio" name="ItemAvailable" value="0">No<span class="red"> -you must choose one of them</span><br><br>
Special Offer: <input type="radio" name="ItemSpecialOffer" value="1">Yes
				<input type="radio" name="ItemSpecialOffer" value="0">No<span class="red"> -you must choose one of them</span><br><br>
Price: <input type="text" size="20" name="ItemPrice"><span class="red"> -only double allowed, for example 199.99</span><br><br>
Category: 	<select name="ItemCategory">
			<option value="Laptop">Laptop</option>
			<option value="Netbook">Netbook</option>
			<option value="Tablet">Tablet</option>
			<option value="E-reader">E-reader</option>
			</select><br><br>
Brand: <input type="text" size="40" name="ItemBrand"><br><br>
Model Number: <input type="text" size="40" name="ItemModelNum"><br><br>
Operation System: <input type="text" size="40" name="ItemOpSys"><br><br>
CPU: <input type="text" size="40" name="ItemCpu"><br><br>
Memory: <input type="text" size="20" name="ItemMem"><br><br>
HDD Size: <input type="text" size="20" name="ItemHdd"><br><br>
Screen Size: <input type="text" size="40" name="ItemScreenSize"><br><br>
Short Description: <br><textarea name="ItemShortDesc" rows="5" cols="70" ></textarea><br><br>
Description: <br><textarea name="ItemDesc" rows="10" cols="70" ></textarea><br><br>
<span class="red">For the pictures only file names allowed, for example image.jgp</span><br><br>
Picture1: <input type="text" size="40" name="ItemPicture1"><br><span class="red"> the first picture must be .png with transparent background</span><br><br>
Picture2: <input type="text" size="40" name="ItemPicture2"><br><br>
Picture3: <input type="text" size="40" name="ItemPicture3"><br><br>
Picture4: <input type="text" size="40" name="ItemPicture4"><br><br>
Picture5: <input type="text" size="40" name="ItemPicture5"><br><br>
Official URL: <input type="text" size="70" name="ItemOfficialUrl"><br><span class="red"> whole URL eg http://wwww.example.com</span><br><br>

<input type="submit" value="Insert">

</from>

</fieldset>
</div>

<div id="footer">
<p align="center">Copyright &#169; Istvan Franko, 2014</p>
</div>


</div>
</body
</html>