<!--Notice: (c)2013 This page is part of the management program for Tlhomeso Timbers, Gaborone, 
and developed by Customized Software (Pty) Ltd, Gaborone, Botswana. 
Customized Software holds the copyright on the source code on this and all other pages in the 
management program. For more info contact Customized Software on email: info@bwcustomized.com-->

<?php
include("../include/session.php");

	
	if (isset($_GET['new_button']) )
	   {
		 $action='storeItemWiz0.php';
	   }
		 
	if (isset($_GET['finish_button']) )
	  {
		$action='issued_list.php' ;
	  }
	
	$d = date("d");
	$m = date("m");
	$y = date("Y");
	
	$user_id = $_SESSION['username'];
	date_default_timezone_set('Africa/Khartoum');
    $entry_date = date("Y-m-d H:i:s",time()-3600); 
	
		
	
	 
	$table_name = $_SESSION['db_prefix']."_item_supply";
	$item_query = "INSERT INTO $table_name (`item_name`, `group`, `cost`, `returnable`) VALUES ('".$_SESSION['item_name']."','".$_SESSION['item_group']."','".$_SESSION['cost']."','".$_SESSION['returnable']."')";
										
								
	execsql($item_query);
	//echo $item_query;
		
	$table_name = $_SESSION['db_prefix']."_tracking_hr";
	$action_query = "INSERT INTO $table_name (entry_date, user, action, details) VALUES ('".$entry_date."' ,'".$user_id."','New Supply Item' ,'".$_SESSION['item_name']."' )";
	execsql($action_query);
	
	 $_SESSION['item_name']="";
     $_SESSION['item_group'] ="";
	 $_SESSION['cost'] = "";
	 $_SESSION['returnable'] = "";
	 
?>

<script language="javascript" type="text/javascript">
        <!--
		  window.location="<?php echo $action ?> ";
        -->
       </script>



