<?php 
if (isset($_SESSION['company_id'])) {
    ?>
	<ul class="breadcrumb">
	    <li><a href="#">Home</a></li>
	    <li><a class="active" href="#">Branches Categories</a></li>
	</ul>

<div class="page-heading">
	<h1>View Categories</h1>
</div>

	<div class="table-responsive custom-table">
		<?php 
    $branch = new branch();
    $branch_spice = new branch_spice();
    $results = $branch_spice->get_branch_spice();
    ?>
		<table id="myTable">  
	        <thead>  
	          <tr>  
	            <th>Name</th>  
	          	<th>Status</th> 
	            <th></th>  
	          </tr>  
	        </thead>  
	        <tbody>  

	        <?php 
    foreach ($results as $res) {
        if ($res->branch_spice_company == $_SESSION['company_id']) {
	    <li><a class="active" href="#" >Add</a></li>
	</ul>

<div class="page-heading">
	<h1>Add Item</h1>
</div>

<div class="form-container">
<?php 
    $branch = new branch();
    $all_branch = $branch->get_branches();
    $branch_category = new branch_category();
    $all_branch_category = $branch_category->get_branch_category();
    $branch_menu_type = new branch_menu_type();
    $all_branch_menu_type = $branch_menu_type->get_branch_menu_type();
    $branch_spice = new branch_spice();
    $all_branch_spice = $branch_spice->get_branch_spice();
    $branch_item = new branch_item();
    $ID = isset($_GET['id']) ? $_GET['id'] : NULL;
    if (isset($_POST['add_branch_item'])) {
        // Update old record
        if (isset($ID)) {
            $results = $branch_item->update_branch_item($_POST, $ID);
        } else {
            // Insert new
            $results = $branch_item->insert_branch_item($_POST);
        }
        if ($results) {
            echo '<div class="alert alert-success" role="alert">';
            echo isset($_GET['id']) ? 'Updated ' : 'Added ';
            echo 'branch item Sucessfully </div>';
	
	<ul class="breadcrumb">
	    <li><a href="#">Home</a></li>
	    <li><a href="view_branch_spice.php">Spices</a></li>
	    <li><a class="active" href="#" >Add</a></li>
	</ul>

<div class="page-heading">
	<h1>Add Category</h1>
</div>

<div class="form-container">
<?php 
    $branch = new branch();
    $all_branch = $branch->get_branches();
    $branch_spice = new branch_spice();
    $ID = isset($_GET['id']) ? $_GET['id'] : NULL;
    if (isset($_POST['add_branch_spice'])) {
        // Update old record
        if (isset($ID)) {
            $results = $branch_spice->update_branch_spice($_POST, $ID);
        } else {
            // Insert new
            $results = $branch_spice->insert_branch_spice($_POST);
        }
        if ($results) {
            echo '<div class="alert alert-success" role="alert">';
            echo isset($_GET['id']) ? 'Updated ' : 'Added ';
            echo 'branch category Sucessfully </div>';
        } else {
            echo '<div class="alert alert-danger" role="alert"> Error </div>';